Question about CCSpriteSheet
I'm using cocos2d to develop game,but i 've got some problems.
In game the first time collided with the props would to cause the program slow down,after that the program runs smoothly,but the position of props in scre开发者_如何学Goen wouldn't match with the position in my code(such as overlap)
I 've checked the console,it show :
CCSpriteSheet: resizing TextureAtlas capacity from [1] to [2].
I guess that may be the point to cause program slow down,but i did not use the CCSpriteSheet anywhere. That confused me a lot....
Does anyone encountered the same situation?or give me some suggestions?
thanks a lot ~~~
Only slows down the first time it runs? I worked around this by running all of my actions or things which happen (in your case this collision) so that they all happened together on a loading screen.
This means that all the actions which initially slow down my game are cleared up behind the scenes as it were.
So what I did: When the scene first runs, add a splash loading screen (simply an image hiding your scene) run all your actions while this loading screen can be seen, then once they have al been run reset everything and remove loading screen. Its pretty easy.
This way when the player actually plays the game it runs smoothly because the initial loading has already happened.
精彩评论