GameRoot
The game root is basically the whole game state at a given point, combining all important classes. We don't have globals, but this class is passed to almost all game classes.
Constructor Summary
| Public Constructor | ||
| public |
constructor(app: Application) Constructs a new game root |
|
Member Summary
| Public Members | ||
| public |
app: * |
|
| public |
|
|
| public |
|
|
| public |
Whether a bulk operation is running |
|
| public |
|
|
| public |
canvas: HTMLCanvasElement |
|
| public |
context: CanvasRenderingContext2D |
|
| public |
currentLayer: Layer |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
gameMode: GameMode |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
logic: GameLogic |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
queue: {"requireRedraw": *} |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
signals: {"entityManuallyPlaced": *, "entityAdded": *, "entityChanged": *, "entityGotNewComponent": *, "entityComponentRemoved": *, "entityQueuedForDestroy": *, "entityDestroyed": *, "resized": *, "readyToRender": *, "aboutToDestruct": *, "gameSaved": *, "gameRestored": *, "gameFrameStarted": *, "storyGoalCompleted": *, "upgradePurchased": *, "postLoadHook": *, "shapeDelivered": *, "itemProduced": *, "bulkOperationFinished": *, "editModeChanged": *, "prePlacementCheck": *, "freeEntityAreaBeforeBuild": *} |
|
| public |
|
|
| public |
|
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
destruct() Destructs the game root |
|
| public |
reset() Resets the whole root and removes all properties |
|
Public Constructors
public constructor(app: Application) source
Constructs a new game root
Params:
| Name | Type | Attribute | Description |
| app | Application |
