开发者

Continuous touch event on button in cocos2d

开发者 https://www.devze.com 2023-01-08 01:53 出处:网络
How do i get Continuous touch event on button in cocos2d. Is there an开发者_C百科y method or properties for that?

How do i get Continuous touch event on button in cocos2d. Is there an开发者_C百科y method or properties for that? I don't want to touch multiple time just touch the button work smooth.

Thank You.


  1. On touch-begin event (set a boolean variable called touched to true).

  2. On touch-move event (if touched is true, then do whatever u want for the continuous processing you want to do).

  3. On touch-event event (set touched variable to false, and stop whatever continues processing you were doing).

0

精彩评论

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