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

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...