suganya

Members
  • Content count

    4
  • Joined

  • Last visited

  1. update: function() { // game.physics.arcade.collide(turnip, background); if (this.time.now+500 > planttime) { sprite=game.add.sprite(game.rnd.integerInRange(1000, 1000)+100, game.rnd.integerInRange(500, 600), 'atlas', "BG" + game.rnd.integerInRange(0, 2)); game.physics.enable(sprite, Phaser.Physics.ARCADE); sprite.body.immovable = true; sprite.body.velocity.x=-500; planttime=planttime+3500; game.physics.arcade.collide(turnip, background,self.collisionHandler,null,this); } }, collisionHandler:function () { console.log("collide"); },
  2. i want change time on duration

    time = game.time.events.add(Phaser.Timer.SECOND * 10); game.input.onDown.add(function() { time = time + (1000 * 5); console.log("Added 5 seconds"); }, this);
  3. Changing timer duration

    i want to timer,if timer is running extra adding 1 seconds