Skip to content

@ue-too/board-game-engine / index / GenericAction

類別: GenericAction

定義於: action-system/action.ts:11

實作

建構函式

建構函式

new GenericAction(type, actor, targets, parameters, preconditions, costs, effects): GenericAction

定義於: action-system/action.ts:21

參數

type

string

actor

number

targets

number[]

parameters

Record<string, unknown>

preconditions

Precondition[]

costs

Effect[]

effects

Effect[]

回傳

GenericAction

屬性

actor

actor: number

定義於: action-system/action.ts:13


costs

costs: Effect[] = []

定義於: action-system/action.ts:17


effects

effects: Effect[] = []

定義於: action-system/action.ts:18


parameters

parameters: Record<string, unknown>

定義於: action-system/action.ts:15


preconditions

preconditions: Precondition[]

定義於: action-system/action.ts:16


targets

targets: number[]

定義於: action-system/action.ts:14


type

type: string

定義於: action-system/action.ts:12

實作了

Action.type

方法

canExecute()

canExecute(): boolean

定義於: action-system/action.ts:39

回傳

boolean


execute()

execute(): Event[]

定義於: action-system/action.ts:43

回傳

Event[]