diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-01 21:29:40 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-01 21:29:40 -0700 |
commit | c3242b171cdbb36a26fda04c7148b9b40a5f5c33 (patch) | |
tree | 5060cb6d34e01f36687c0ce79e5ae0b1b8767e63 /src/engine/components/Grid.ts | |
parent | d08e0105cbc59c6cc804f04aaf1e4e625a13960c (diff) | |
download | the-abstraction-engine-c3242b171cdbb36a26fda04c7148b9b40a5f5c33.tar.gz the-abstraction-engine-c3242b171cdbb36a26fda04c7148b9b40a5f5c33.zip |
player movement
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; + } +} |