Phaser API Documentation

  Version: 
sprite(x, y, key, [frame])

Description:

Creates a new Arcade Sprite object with a Dynamic body.

Parameters:

name type arguments description
x number

The horizontal position of this Game Object in the world.

y number

The vertical position of this Game Object in the world.

key string

The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.

frame string | number <optional>

An optional frame from the Texture this Game Object is rendering with.

Returns:
Description:

The Sprite object that was created.

Since: 3.0.0