开发者

Silverlight bouncing ball using double animation

Just wondering if anyone has any guida开发者_运维技巧nce on making a ball continuously bounce around inside a box (4 walls), changing direction after hitting a wall and using DoubleAnimations so that it can be hardware accelerated. I've found code for moving a ball by setting its canvas X Y coordinates but it's quite slow.

Any ideas?

Thanks for your time


This is a sample application for pinball. They have bouncing off of bumpers but gives a good example with decent performance.

http://blogs.msdn.com/b/coding4fun/archive/2009/11/30/9896181.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜