简体   繁体   English

在屏幕上移动的按钮

[英]Buttons that move on screen

I want to have multiple buttons on the screen that continuously move.我想在屏幕上有多个连续移动的按钮。 When they touch the sides, they should bounce back.当它们接触到侧面时,它们应该会反弹回来。 How do i do this?我该怎么做呢? Any helpful links?任何有用的链接? Ideas?想法? Thanks!谢谢!

Also have a look at cocos2d which i think may make it easier to do something like this if they have to constantly be moving.还可以看看 cocos2d,我认为如果他们必须不断移动,这样做可能会更容易。

cocos2d is a game platform which has physics etc but also i believe has support for buttons so it should not be hard to achieve something like this. cocos2d 是一个游戏平台,它具有物理等功能,但我相信它也支持按钮,因此实现这样的目标应该不难。 Check out the cocos2d website and documentation.查看 cocos2d 网站和文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM