Sprite
Class: Phaser.Sprite
Constructor
new Sprite(game, x, y, key, frame)
Sprites are the lifeblood of your game, used for nearly everything visual.
At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.
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.
Parameters
Name | Type | Description |
---|---|---|
game | Phaser.Game | A reference t |