Options
All
  • Public
  • Public/Protected
  • All
Menu

可用的操作

Type parameters

Hierarchy

  • IStateOperator

Index

Properties

emitEvent

emitEvent: <N>(name: N, payload?: EP[N], options?: undefined | { emitter?: Player }) => any

派发事件

Type declaration

    • <N>(name: N, payload?: EP[N], options?: undefined | { emitter?: Player }): any
    • Type parameters

      • N: Event

      Parameters

      • name: N
      • Optional payload: EP[N]
      • Optional options: undefined | { emitter?: Player }

      Returns any

getState

getState: () => State

获取当前的状态

Type declaration

    • (): State
    • Returns State

setState

setState: (state: Partial<State>) => void

更新状态,新的状态会 merge 到当前的状态中

Type declaration

    • (state: Partial<State>): void
    • Parameters

      • state: Partial<State>

      Returns void

Legend

  • Object literal
  • Variable
  • Function with type parameter
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Property
  • Enumeration
  • Class with type parameter

Generated using TypeDoc