Skip to main content

Visual

Description:

  A class to represent a visual effect object like Particle, Frame Animation or just a Sprite.

Class Object: Platformer.Visual Class.

Inherits from: Node.

playing

Type: Readonly Field.

Description:

  Whether the visual effect is currently playing or not.

Signature:

const playing: boolean

start

Type: Function.

Description:

  Starts playing the visual effect.

Signature:

start: function(self: Visual)

stop

Type: Function.

Description:

  Stops playing the visual effect.

Signature:

stop: function(self: Visual)

autoRemove

Type: Function.

Description:

  Automatically removes the visual effect from the game world when it finishes playing.

Signature:

autoRemove: function(self: Visual): Visual

Returns:

Return TypeDescription
VisualThe same "Visual" object that was passed in as a parameter.