arcbox Posted February 27, 2014 Share Posted February 27, 2014 Hello, I am trying to create a custom Player class for my game that extends the Sprite class from Phaser, but I'm having trouble doing so. The desired outcome would be that I have access to all of the Sprite methods in this new class, but I can also add to it by adding to the prototype. Any ideas? Thanks! Link to comment Share on other sites More sharing options...
Hsaka Posted February 27, 2014 Share Posted February 27, 2014 Hey, here's an example of how to do it: http://examples.phaser.io/_site/view_full.html?d=sprites&f=extending+sprite+demo+1.js&t=extending%20sprite%20demo%201 Link to comment Share on other sites More sharing options...
arcbox Posted February 27, 2014 Author Share Posted February 27, 2014 Awesome! Exactly what I needed, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts