Phaser API Documentation

  Version: 
setFrame(frame)

Description:

Sets the frame this Game Object will use to render with.

The Frame has to belong to the current Texture being used.

It can be either a string or an index.

Parameters:

name type description
frame string | number

The name or index of the frame within the Texture.

Returns:
Description:

This Game Object instance.

Since: 3.0.0