bambuk Posted September 24, 2017 Share Posted September 24, 2017 Hello, I am originally coming from Unity3D, so I have some troubles understanding planning my project in phaser. I have different enemies in my game with different behaviors. In unity I would create socalled prefabs and assign special scripts to this prefrabricated gameobjects. Than I can load them into the game whenever I want. Is it opossible to do something similiar in phaser? All I saw is that i can add sprites in code and work with them after added, but that seems quite complicated for my purposes. Link to comment Share on other sites More sharing options...
PhaserEditor2D Posted September 25, 2017 Share Posted September 25, 2017 Hi, You can create something similar to prefabs in Phaser: custom sprites: https://phaser.io/examples/v2/sprites/extending-sprite-demo-1 It is just about to extends the Phaser.Sprite class and implement the "update" method. Link to comment Share on other sites More sharing options...
Recommended Posts