@koreez/phaser2-animate
Version:
20 lines (19 loc) • 1.47 kB
TypeScript
import { Animate } from "./Animate";
export interface IAnimateFactory extends Phaser.GameObjectFactory {
/**
* Create a new Animate with specific position and sprite sheet key.
*
* At its most basic a Animate consists of a set of coordinates and a texture that is used when rendered.
* They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),
* events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.
*
* @param x The x coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.
* @param y The y coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.
* @param animationKey The json used as a data by this animate object during rendering.
* @param textureKey The image used as a texture by this display object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.
* @param loop
* @param group Optional Group to add the object to. If not specified it will be added to the World group.
* @return The newly created animate object.
*/
animate(x?: number, y?: number, animationKey?: any, textureKey?: any, loop?: boolean, group?: Phaser.Group | Phaser.Stage): Animate;
}