Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Is it better to extend a Phaser.Sprite or aggereate with it?


Vaughan
 Share

Recommended Posts

if you want to pass the entity to any Phaser calls then it needs to either be a Sprite or support all Sprite's properties (including functions) so that it looks identical to a Sprite. if you're okay with passing 'entity.sprite' (or whatever) to any method that expects a Sprite, then you're free to do things that way. 

 

overall though, I think you'll have less trouble if you either extend Sprite or use Sprite objects directly.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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