Created
September 19, 2020 01:51
-
-
Save 46bit/b3664643ae007173d6bc90e7df1e53f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Vector } from '../../vector'; | |
export interface IEntity2 { | |
id: string; | |
player?: Player; | |
positioning: IPositioning; | |
lifecycle?: ILifecycle; | |
behaviour?: IBehaviour; | |
engineering?: IEngineering; | |
sidecars?: {[name: string]: IEntity2}; | |
} | |
export interface IPositioning { | |
position: Vector; | |
collisionRadius: number; | |
velocity?: number; | |
direction?: number; | |
angularVelocity?: number; | |
movementRate: number; | |
turnRate: number; | |
route?: Vector[]; | |
routeTo?: Vector; | |
updateVelocity?(): void; | |
updateDirection?(): void; | |
applyDragForces?(): void; | |
shouldTurnLeftToReach?(destination: Vector): boolean; | |
shouldTurnRightToReach?(destination: Vector): boolean; | |
} | |
export interface ILifecycle { | |
health: number; | |
fullHealth: number; | |
dead: boolean; | |
built: boolean; | |
buildCost: number; | |
buildableByMobileUnits: boolean; | |
} | |
export interface IBehaviour { | |
orders: Order[]; | |
orderBehaviours: OrderMatchAllCases<boolean>; | |
behave(): void; | |
} | |
export interface IEngineering { | |
productionRange: number; | |
energyProvided: number; | |
construction?: IEntity2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment