阅读背景:

C#让图片框远离另一个图片框

来源:互联网 

Okey, so I'm working on a "mini-game": you are a cat and you need to catch a mouse. I'm trying to make a mouse (picturebox) run away from a cat (picturebox) IF the cat is closer than 10 pixels (or 15 or whatever) to the mouse, then mouse starts running to another direction. If it the cat is not that close, then the mouse stays where it is. I have option that wherever the cat is, the mouse is running away to the opposite direction, but I want it to move ONLY IF the cat is closer than 10 px and I can't do that, I don't know how. I've tried some options, but didn't work. Could you help me? Or give some tips? Thank you.Okey, so I'm working on a "mini-game": you are




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: