Interface StateBehaviour<T, SL>

各状態の振る舞いを関数で指定

Type Parameters

  • T

  • SL

Hierarchy

  • StateBehaviour

Properties

Properties

enter: ((this: T, ...arg: any) => any)

Type declaration

    • (this: T, ...arg: any): any
    • 状態遷移した際に一度だけ行う処理

      • thisの参照は設定したターゲット
      • update経由で引数を渡すことも可能

      Parameters

      • this: T
      • Rest ...arg: any

      Returns any

update?: ((this: T, ...arg: any) => void | SL)

Type declaration

    • (this: T, ...arg: any): void | SL
    • その状態中、毎フレーム行う処理

      • thisの参照は設定したターゲット
      • update経由で引数を渡すことも可能
      • 状態ラベルをreturnするとその状態に移行(ただし同じ状態ラベルの時はそのまま)

      Parameters

      • this: T
      • Rest ...arg: any

      Returns void | SL

Generated using TypeDoc