englercj / phaser-debug

Simple debug module for phaser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phaser Debug

Simple debug module for the Phaser game framework.

Screenshot

Usage

Simply download the phaser-debug.js script from the latest release and include it on your page after including Phaser:

<script src="phaser.js"></script>
<script src="phaser-debug.js"></script>

After adding the script to the page you can activate it by enabling the plugin:

game.add.plugin(Phaser.Plugin.Debug);

TypeScript Usage

Add the phaser-debug.js script to the page (see the first part of the usage section above).

In your phaser.d.ts file, inside module Plugin add:

class Debug extends Phaser.Plugin {

   constructor(game: Phaser.Game, parent: Phaser.PluginManager);
}

Activate the plugin:

this.game.add.plugin(new Phaser.Plugin.Debug(this.game, this.game.plugins));

Browser Support

Currently this module supports the following browsers:

  • Desktop
  • Firefox 30+
  • Chrome 27+
  • Safari 5.1+
  • Opera 23+

About

Simple debug module for phaser

License:MIT License


Languages

Language:JavaScript 74.6%Language:CSS 21.0%Language:HTML 4.4%