Vaughan Posted January 28, 2014 Share Posted January 28, 2014 Is it better for a game entity to contain a sprite, or be the sprite? Which does Phaser play nicer with? Link to comment Share on other sites More sharing options...
jcs Posted January 28, 2014 Share Posted January 28, 2014 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 More sharing options...
Vaughan Posted January 29, 2014 Author Share Posted January 29, 2014 I might extend sprite, I'm just afraid of having too much junk. Link to comment Share on other sites More sharing options...
Recommended Posts