diff options
Diffstat (limited to 'src/engine/components/Grid.ts')
-rw-r--r-- | src/engine/components/Grid.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/engine/components/Grid.ts b/src/engine/components/Grid.ts new file mode 100644 index 0000000..0c18a65 --- /dev/null +++ b/src/engine/components/Grid.ts @@ -0,0 +1,20 @@ +import { Component, ComponentNames } from "."; +import { Coord2D, Direction } from "../interfaces"; + +export class Grid extends Component { + public initialized: boolean; + + public gridPosition: Coord2D; + public movingDirection: Direction; + public pushable: boolean = false; + + constructor(pushable: boolean = false, position: Coord2D = { x: 0, y: 0 }) { + super(ComponentNames.Grid); + + this.initialized = false; + + this.gridPosition = position; + this.movingDirection = Direction.NONE; + this.pushable = pushable; + } +} |