phaser-debug-timer

1.0.3 • Public • Published

Screenshot

Demo

Use ⏱

Default arguments are shown. The default timer is the master timer, game.time.events.

// 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):
// {width}px === 1s
game.debug.timerEvent(event, x, y, width = 100, height = 20, label = event.name)
 
// Show all pending timer events for a timer:
// {width}px === 1s
game.debug.timerEvents(timer = this.game.time.events, x, y, width = 100, height = 20, label = timer.name)
 
// Show the next pending timer event:
// {width}px === 1s
game.debug.timerNextEvent(timer = this.game.time.events, x, y, width = 100, height = 20, label = timer.name)

You may find it helpful to name your timers and events:

var timer = this.game.time.create();
timer.name = 'name';
 
var timerEvent = timer.add(/**/);
timerEvent.name = 'name';

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i phaser-debug-timer

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • samme