Namespace: GameObjects

Phaser. GameObjects

Classes

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

Namespaces

Components
Events
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 Phaser.Types.GameObjects.GameObjectConfig

The config to build the GameObject with.

Since: 3.0.0
Source: src/gameobjects/BuildGameObject.js (Line 11)
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