Jump to content

addTimer and pause()


Recommended Posts

I have the following:


this.countDownText = new game.PIXI.Text("allo", { font: '40px Verdana',fill:'white'});        this.countDownText.position.set(20, 10);        this.stage.addChild(this.countDownText);                         this.ShootTimer = game.scene.addTimer(1000, this.countdown.bind(this), true);            this.countdown();  
and try to pause ShootTimer when it´s meets a condition:
countdown: function() {                           if(this.countingDown  < 50){                    this.ShootTimer.pause();                     console.log("im there");//dette virker  }                      this.countingDown --;         this.countDownText.setText(this.countingDown.toString());  }

But it does not pause. Any ideas :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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