vadim2007 Posted August 5, 2017 Share Posted August 5, 2017 Hi all! In my phaser game a lot of graphics and animations. I have a trouble with fps, it's gradually fall.. For 10 minutes after start, 60 fps falls to 10 fps. With what it can be connected? I guess, maybe animations not destroy after they are completed? Code looks like this: //global var idle,loss; //create idle = game.add.sprite(0,0, 'monster_idle'); //idle pressed loss = game.add.sprite(0,0, 'monster_loss'); idle.destroy(); idle=null; //on loss animation complete loss.destroy(); loss=null; hp-=10; //and repeat idle = game.add.sprite(0,0, 'monster_idle'); Link to comment Share on other sites More sharing options...
Recommended Posts