按钮点击速度,两个按钮,增加积分
我试图在 cocos2d box2d 上制作一个简单的游戏,它基本上有两个按钮和一个带有点的标签。分数每秒增加 +1。
我想做的是,玩家按顺序点击两个按钮,所以它必须是“button1”然后“button2”然后“button1”然后“button2”...... 如果做得正确,那么点数增加速度应该增加,并且顺序点击按钮的速度越快,点数增加的速度就越快。
我该怎么做呢?有什么想法吗?
im trying to make a simple game on cocos2d box2d, its basically got two buttons and a label with the points. the points increment by +1 every second.
what im trying to do is, the player taps both buttons sequentially so it has to be 'button1' then 'button2' then 'button1' then 'button2' .....
if this is done properly then the points increment speed should increase, and the faster the buttons are tapped sequentially, the faster the points should increase.
how can i go about doing this? any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个想法很简单:只有当另一个按钮是最后按下的按钮时才增加分数。就是这样。所以:
这有道理吗?
The idea is simple: you only increment the score when the other button was the last pressed button. That's it. So:
Does this make sense?