Namespace: GameObjects

Phaser. GameObjects

Classes

Arc
BitmapText
Blitter
Container
Curve
DisplayList
DynamicBitmapText
Ellipse
GameObject
GameObjectCreator
GameObjectFactory
Graphics
Grid
Group
Image
IsoBox
IsoTriangle
Light
LightsManager
LightsPlugin
Line
Mesh
PathFollower
Polygon
Quad
Rectangle
RenderTexture
Shape
Sprite
Star
Text
TileSprite
Triangle
UpdateList
Zone

Namespaces

Components
Particles
RetroFont

Methods


<static> BuildGameObject(scene, gameObject, config)

Builds a Game Object using the provided configuration object.

Parameters:
Name Type Description
scene Phaser.Scene

A reference to the Scene.

gameObject Phaser.GameObjects.GameObject

The initial GameObject.

config GameObjectConfig

The config to build the GameObject with.

Since: 3.0.0
Source: src/gameobjects/BuildGameObject.js (Line 31)
Returns:

The built Game Object.

Type
Phaser.GameObjects.GameObject

<static> BuildGameObjectAnimation(sprite, config)

Adds an Animation component to a Sprite and populates it based on the given config.

Parameters:
Name Type Description
sprite Phaser.GameObjects.Sprite

The sprite to add an Animation component to.

config object

The animation config.

Since: 3.0.0
Source: src/gameobjects/BuildGameObjectAnimation.js (Line 9)
Returns:

The updated Sprite.

Type
Phaser.GameObjects.Sprite