Apoptyzm Posted January 8, 2015 Share Posted January 8, 2015 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 More sharing options...
Recommended Posts