Skip to main content

UnitAction

Description:

  A record that represents an action that can be performed by a "Unit".

Class Object: Platformer.UnitAction Class.

reaction​

Type: Field.

Description:

  The length of the reaction time for the "UnitAction", in seconds. The reaction time will affect the AI check cycling time.

Signature:

reaction: number

recovery​

Type: Field.

Description:

  The length of the recovery time for the "UnitAction", in seconds. The recovery time will mainly affect how long the Playable animation model will do transitions between animations played by different actions.

Signature:

recovery: number

name​

Type: Readonly Field.

Description:

  The name of the "UnitAction".

Signature:

const name: string

doing​

Type: Readonly Field.

Description:

  Whether the "Unit" is currently performing the "UnitAction" or not.

Signature:

const doing: boolean

elapsedTime​

Type: Readonly Field.

Description:

  The elapsed time since the "UnitAction" was started, in seconds.

Signature:

const elapsedTime: number

owner​

Type: Readonly Field.

Description:

  The "Unit" that owns this "UnitAction".

Signature:

const owner: Unit