1 decade ago by DaveVoyles
I'm trying to create a timer that allows me to have text flashing on the screen, at 1 second intervals.
I'm running into some issues here, so perhaps one of you has some experience with it.
Here is what my draw function looks like:
So after 1 second, the text disappears, but how can I make it reappear?
I'm running into some issues here, so perhaps one of you has some experience with it.
Here is what my draw function looks like:
init: function(){ ... textTimer = new ig.Timer(1); ... } draw: function(){ this.parent(); if (this.textTimer) { this.font.draw('Bullet Time!', this.pos.x, this.pos.y - 20, ig.Font.ALIGN.CENTER); if (this.textTimer.delta() > 0) { this.textTimer = null; } } },
So after 1 second, the text disappears, but how can I make it reappear?