开发者

same animation on the screen multiple times (cocos2d)

开发者 https://www.devze.com 2023-03-19 23:25 出处:网络
I would like to add the same sprite animation multiple times. I\'ve tried it with a loop. When I run th开发者_StackOverflowe project on iPhone Simulator it tells me that I\'ve already added this child

I would like to add the same sprite animation multiple times. I've tried it with a loop. When I run th开发者_StackOverflowe project on iPhone Simulator it tells me that I've already added this child. The sprite animations code is here: http://getsetgames.com/2010/04/18/how-to-animate-sprites-in-cocos2d/


If you try to add the same pointer more than once it doesn't like it. Just create multiple animations (therefore multiple pointers). You can just make a copy of the same animation multiple times if you like. You may also need to create new CCSprite pointers too depending on your methods. That's all it is though really. It already has the object (the point) so it won't take it again.

0

精彩评论

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