creature(x, y, key, group) → {Phaser.Creature}
Create a new Creature Animation object.
Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.
It allows you to display animated Game Objects that were created with the Creature Automated Animation Tool.
Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.
Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them
loaded before your Phaser game boots.
See the Phaser custom build process for more details.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x | number | <optional> | 0 | The x coordinate of the creature. The coordinate is relative to any parent container this creature may be in. |
y | number | <optional> | 0 | The y coordinate of the creature. The coordinate is relative to any parent container this creature may be in. |
key | string | PIXI.Texture | <optional> | The image used as a texture by this creature object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a PIXI.Texture. | |
group | Phaser.Group | <optional> | Optional Group to add the object to. If not specified it will be added to the World group. |
Returns
The newly created Sprite object.
- Source code: gameobjects/GameObjectFactory.js (Line 125)
Please login to continue.