Jump to content

phaser-debug-timer: Debug methods for timers and timer events


samme
 Share

Recommended Posts

Debug methods for timers and timer events. GitHub / NPM / Demo

// Show duration since timer started:
game.debug.timerElapsed(timer = this.game.time.events, x, y, label = timer.name)

// Show a timer event's pending interval (uncommon):
game.debug.timerEvent(event, x, y, width = 100, height = 20, label = event.name)

// Show all pending timer events for a timer:
// {width}px === 1000ms
// Use, e.g., height = 10 for smaller bars
game.debug.timerEvents(timer = this.game.time.events, x, y, width = 100, height = 20, label = timer.name)

// Show the next pending timer event:
game.debug.timerNextEvent(timer = this.game.time.events, x, y, width = 100, height = 20, label = timer.name)

 

screenshot.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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