Order beta
Interface of @v12-engine/engine
ts
export interface Order<State extends object = Record<string, any>, Init extends object = OrderParams>An order a unit carries out or has queued. State is what its behaviour keeps in it (OrderBehavior<State>): empty as the order is given, so every field of it is one that may not be there yet
Members
groupId
ts
groupId: number;Shared by every unit that received the order from the same command
id
ts
id: number;The order's number, unique in its world
init
ts
init: Init;What it was given, as its type takes it (OrderInits): plain data, saved with the order
started
ts
started: boolean;Whether the order has begun being carried out
state
ts
state: State;Scratch space owned by the order behavior: plain data, saved with the order
type
ts
type: string;The order's type, naming the behaviour that carries it out