Jump to content

Blinking Text


Recommended Posts

Use a timer to count to one second, then reset it to zero, and either set the alpha on the text to 0/1, or set visible to false/true.

var timer = 0;var text = //create phaser text here;//Update functionupdate(){    timer += game.time.elapsed; //this is in ms, not seconds.    if ( timer >= 1000 )    {        timer -= 1000;        text.visible = !text.visible;    }}
Link to comment
Share on other sites


  • Recently Browsing   0 members

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