Jump to content

Figure out amount of time till an event is finished


ForgeableSum
 Share

Recommended Posts

Suppose I create an event using game.time.event.add. That Phaser.TimerEvent is stored in game.time.event.event, great. But how do I calculate how long it will take for that event to fire based on the current game time?

I'm sure it has something to do with tick:

https://phaser.io/docs/2.6.2/Phaser.TimerEvent.html#tick

But what exactly is tick anyway? The docs say "the next game clock time that this event will fire at," but looking in the value stored in there, it is a huge value. Like:

20983490329048

compared to the game clock (game.time.now) which, at the same time is something like:

17002

Are the docs referencing some other clock, and not game.time.now?

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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