Pergunta

I have searched around the interent and this question has been asked many times before, but either I could not understand the answer or it led to a dead end. Right now I have a standard TMX tile map set up in my cocos2d game that I made in Tiled.

One of the tiles in the map is a Gate. The tile of the gate shows an image of just the gate closed. How would I make it that when the player touches a button the gate opens through animation.

I have all the required files for it. For example: Gate.png(Sprite sheet of every frame of the Gate), Gate_Open.plist(Animation Plist), Gate.plist(File to decode the sprite sheet).

If I have a blank scene I can get the gate to animate on its own, but my question is: What is the best way to animate a single tile of a TMX Map? Thanks for you time.

-Marc

Foi útil?

Solução

It might just be a matter of either changing your anchor point for the gate sprite or setting an offset.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top