diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-01 19:45:33 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-01 19:45:33 -0700 |
commit | d08e0105cbc59c6cc804f04aaf1e4e625a13960c (patch) | |
tree | 57d5270e146ce2e0c5cfba30e172ab87a2210514 /src/engine/entities | |
parent | a8d07a790395e14fe7aedd3ba638db466f9c0842 (diff) | |
download | the-abstraction-engine-d08e0105cbc59c6cc804f04aaf1e4e625a13960c.tar.gz the-abstraction-engine-d08e0105cbc59c6cc804f04aaf1e4e625a13960c.zip |
eyes follow cursor
Diffstat (limited to 'src/engine/entities')
-rw-r--r-- | src/engine/entities/Player.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/entities/Player.ts b/src/engine/entities/Player.ts index f25730c..2f616c4 100644 --- a/src/engine/entities/Player.ts +++ b/src/engine/entities/Player.ts @@ -5,6 +5,7 @@ import { Sprite, GridPosition, BoundingBox, + Control, } from "../components"; import { Direction } from "../interfaces/"; @@ -19,14 +20,16 @@ export class Player extends Entity { this.addComponent( new BoundingBox( { - x: 0, - y: 0, + x: 200, + y: 200, }, { width: Player.spriteSpec.width, height: Player.spriteSpec.height }, 0, ), ); + this.addComponent(new Control()); + this.addComponent(new GridPosition(0, 0)); this.addFacingDirectionComponents(); } |