Jump to content

Best way of animated object


Raiper34
 Share

Recommended Posts

Hi,

 

I have for example smiliar animation sheet:

player.png

Is it good way to create animation like this? this.animations.add('walk', [1,2]); , because i inherit from sprite object and this animation is in sprite object, or is there any smarter, more elegant solution?

 

Second question, when i destroy sprite object with this animation, is animation destoryed too? Or should i create special method destory where first destory animation and then object itself?

 

Thanks and sorry for maybe dumb questions.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...