2013-08-08 18:16:47 +00:00
|
|
|
/// <reference path="../_definitions.ts" />
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
module Phaser {
|
|
|
|
|
|
|
|
export interface IGameObject {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reference to the main game object
|
|
|
|
*/
|
2013-08-08 18:16:47 +00:00
|
|
|
game: Phaser.Game;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
2013-05-29 11:24:25 +00:00
|
|
|
/**
|
2013-06-02 02:47:54 +00:00
|
|
|
* The type of game object.
|
2013-05-29 11:24:25 +00:00
|
|
|
*/
|
2013-06-02 02:47:54 +00:00
|
|
|
type: number;
|
2013-05-29 11:24:25 +00:00
|
|
|
|
|
|
|
/**
|
2013-06-02 02:47:54 +00:00
|
|
|
* The ID of the Group this Sprite belongs to.
|
2013-05-29 11:24:25 +00:00
|
|
|
*/
|
2013-08-08 18:16:47 +00:00
|
|
|
group: Phaser.Group;
|
2013-05-29 11:24:25 +00:00
|
|
|
|
2013-07-02 22:41:25 +00:00
|
|
|
/**
|
|
|
|
* The name of the Game Object. Typically not set by Phaser, but extremely useful for debugging / logic.
|
|
|
|
*/
|
|
|
|
name: string;
|
|
|
|
|
2013-05-29 11:24:25 +00:00
|
|
|
/**
|
2013-06-02 02:47:54 +00:00
|
|
|
* x value of the object.
|
2013-05-29 11:24:25 +00:00
|
|
|
*/
|
2013-06-02 02:47:54 +00:00
|
|
|
x: number;
|
2013-05-29 11:24:25 +00:00
|
|
|
|
2013-05-29 01:58:56 +00:00
|
|
|
/**
|
2013-06-02 02:47:54 +00:00
|
|
|
* y value of the object.
|
2013-05-29 01:58:56 +00:00
|
|
|
*/
|
2013-06-02 02:47:54 +00:00
|
|
|
y: number;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
/**
|
2013-06-06 01:47:08 +00:00
|
|
|
* z-index value of the object.
|
2013-05-29 01:58:56 +00:00
|
|
|
*/
|
2013-06-02 02:47:54 +00:00
|
|
|
z: number;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Controls if both <code>update</code> and render are called by the core game loop.
|
|
|
|
*/
|
2013-08-08 10:34:33 +00:00
|
|
|
exists: boolean;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Controls if <code>update()</code> is automatically called by the core game loop.
|
|
|
|
*/
|
2013-08-08 10:34:33 +00:00
|
|
|
active: boolean;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
/**
|
2013-06-06 01:47:08 +00:00
|
|
|
* Controls if this is rendered or skipped during the core game loop.
|
2013-05-29 01:58:56 +00:00
|
|
|
*/
|
2013-08-08 10:34:33 +00:00
|
|
|
visible: boolean;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
2013-07-12 02:28:46 +00:00
|
|
|
/**
|
|
|
|
* The animation manager component
|
|
|
|
*/
|
|
|
|
animations: Phaser.Components.AnimationManager;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Associated events
|
|
|
|
*/
|
2013-08-08 18:16:47 +00:00
|
|
|
events: Phaser.Components.Events;
|
2013-07-12 02:28:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The input component
|
|
|
|
*/
|
2013-08-08 18:16:47 +00:00
|
|
|
input: Phaser.Components.InputHandler;
|
2013-07-12 02:28:46 +00:00
|
|
|
|
2013-05-29 01:58:56 +00:00
|
|
|
/**
|
2013-06-06 01:47:08 +00:00
|
|
|
* The texture used to render.
|
2013-05-29 01:58:56 +00:00
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
texture: Phaser.Display.Texture;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
/**
|
2013-06-06 01:47:08 +00:00
|
|
|
* The transform component.
|
2013-05-29 01:58:56 +00:00
|
|
|
*/
|
2013-08-06 02:14:48 +00:00
|
|
|
transform: Phaser.Components.TransformManager;
|
2013-05-29 01:58:56 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|