Jump to content

Problem with fps


vadim2007
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

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