2013-08-02 18:37:43 +00:00
|
|
|
/// <reference path="../Phaser/Game.ts" />
|
2013-08-06 02:14:48 +00:00
|
|
|
/// <reference path="../Phaser/core/Plugin.ts" />
|
2013-08-02 18:37:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Phaser - Example Plugin
|
|
|
|
*/
|
|
|
|
|
|
|
|
module Phaser.Plugins {
|
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
export class Example extends Phaser.Plugin {
|
2013-08-02 18:37:43 +00:00
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
constructor(game: Phaser.Game, parent) {
|
|
|
|
|
|
|
|
super(game, parent);
|
2013-08-02 18:37:43 +00:00
|
|
|
|
|
|
|
this.active = true;
|
|
|
|
this.visible = true;
|
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
this.hasPreUpdate = false;
|
|
|
|
this.hasUpdate = false;
|
|
|
|
this.hasPostUpdate = false;
|
2013-08-02 18:37:43 +00:00
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
this.hasPreRender = false;
|
|
|
|
this.hasRender = false;
|
|
|
|
this.hasPostRender = false;
|
2013-08-02 18:37:43 +00:00
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
}
|
2013-08-02 18:37:43 +00:00
|
|
|
|
|
|
|
/**
|
2013-08-06 02:14:48 +00:00
|
|
|
* Pre-update is called at the start of the update cycle, before any other updates have taken place.
|
|
|
|
* It is only called if active is set to true.
|
2013-08-02 18:37:43 +00:00
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
public preUpdate() {
|
|
|
|
}
|
2013-08-02 18:37:43 +00:00
|
|
|
|
|
|
|
/**
|
2013-08-06 02:14:48 +00:00
|
|
|
* Pre-update is called at the start of the update cycle, after all the core system updates have taken place, but before the world update.
|
2013-08-02 18:37:43 +00:00
|
|
|
* It is only called if active is set to true.
|
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
public update() {
|
2013-08-02 18:37:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Post-update is called at the end of the objects update cycle, after other update logic has taken place.
|
|
|
|
* It is only called if active is set to true.
|
|
|
|
*/
|
|
|
|
public postUpdate() {
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pre-render is called right before the Game Renderer starts and before any custom preRender callbacks have been run.
|
|
|
|
* It is only called if visible is set to true.
|
|
|
|
*/
|
|
|
|
public preRender() {
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-08-06 02:14:48 +00:00
|
|
|
* Pre-render is called right before the Game Renderer starts and before any custom preRender callbacks have been run.
|
2013-08-02 18:37:43 +00:00
|
|
|
* It is only called if visible is set to true.
|
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
public render() {
|
2013-08-02 18:37:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-08-06 02:14:48 +00:00
|
|
|
* Post-render is called after every camera and game object has been rendered, also after any custom postRender callbacks have been run.
|
|
|
|
* It is only called if visible is set to true.
|
2013-08-02 18:37:43 +00:00
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
public postRender() {
|
2013-08-02 18:37:43 +00:00
|
|
|
}
|
|
|
|
|
2013-08-06 02:14:48 +00:00
|
|
|
|
2013-08-02 18:37:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|