Jump to content

TimedEvent doesn't work


Apoptyzm
 Share

Recommended Posts

Hi,

i have basic timed event that won't call provided method, not even once... It's so basic that i don't know what can be the cause.

EnemiesManager.prototype.singleEnemySpawnUpdate = function () {    if(this.timer.events.length===0){            this.timer.add(                Phaser.Timer.SECOND * this.game.rnd.integerInRange(1,2),                 this.addRandomEnemy,                 this);            this.timer.start(0);        }};//never called methodEnemiesManager.prototype.addRandomEnemy = function(){    this.getRandomGroup().addObject(this.game.rnd.integerInRange(100,700),this.game.camera.y+100);    this.timer.stop(true);};
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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