Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • StateMachine

Index

Constructors

constructor

Properties

animations

animations: Animation[]
memberof

StateMachine

description

All animations used by the StateMachine

since

2.0.0

config

memberof

StateMachine

description

The configuration of the StateMachine

since

2.0.0

connections

connections: AnimationState[][]
memberof

StateMachine

description

A 2D Array of AnimationStates, one connection is represented by a nested array, ex: StateMachine.connections = [[/* one connection here */]]

since

2.0.0

currentState

currentState: AnimationState
memberof

StateMachine

description

The current AnimationState that is traveled to, use this to get and play the animation

since

2.0.0

Methods

canTravel

  • canTravel(dest: string): boolean
  • memberof

    StateMachine

    description

    Checks if the currentState's connections include another AnimationState connection with a passed key

    since

    2.0.0

    Parameters

    • dest: string

      The destination or key to find

    Returns boolean

connectLoop

connectTo

travel

  • memberof

    StateMachine

    description

    Travels along the imaginary 2D plane to find a connection based on other connections' vectors

    since

    2.0.0

    Parameters

    • vector: Vector2

      Vector to match to another Connection that will set the currentState as

    Returns void

Generated using TypeDoc