[英]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!
谢谢!
you go through the apple animation document.你 go 通过苹果 animation 文件。
Introduction to Core Animation Programming Guide 内核介绍 Animation 编程指南
Check the following SO post.检查以下 SO 帖子。
How to move several buttons throughout the screen 如何在整个屏幕上移动多个按钮
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.