开发者

What's the best practice in cocos2d to redirect an animating sprite?

开发者 https://www.devze.com 2022-12-09 17:54 出处:网络
I am making a game where \'defending\' sprites need to animate towards \'attacki开发者_C百科ng\' sprites.

I am making a game where 'defending' sprites need to animate towards 'attacki开发者_C百科ng' sprites. But for example an attacker might change course to attack something else, mid animation. What's the best way to manage animations, and destinations? I believe I must remove any action on a sprite before adding a new one. Perhaps I need to use the shared action manager or something??


Yes, just stop the existing actions, and add the new animation to the sprite.

0

精彩评论

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