diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-07-20 20:47:32 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-07-20 20:47:32 -0700 |
commit | 72c6c7de12e9833f52bf2d0718d70f044f8ab57e (patch) | |
tree | 152f5f31d59011bb8c617bfbcfc44cc8f47ecad5 /client/lib/entities/Floor.ts | |
parent | 0fd9fb097552686f2257c1aa689d797e80057bd1 (diff) | |
download | jumpstorm-72c6c7de12e9833f52bf2d0718d70f044f8ab57e.tar.gz jumpstorm-72c6c7de12e9833f52bf2d0718d70f044f8ab57e.zip |
a bit of refactoring; importing engine into bun for server
Diffstat (limited to 'client/lib/entities/Floor.ts')
-rw-r--r-- | client/lib/entities/Floor.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/client/lib/entities/Floor.ts b/client/lib/entities/Floor.ts deleted file mode 100644 index d51badc..0000000 --- a/client/lib/entities/Floor.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { IMAGES, SPRITE_SPECS, Sprites, type SpriteSpec } from "../config"; -import { BoundingBox, Sprite } from "../components"; -import { TopCollidable } from "../components/TopCollidable"; -import { Entity } from "../entities"; - -export class Floor extends Entity { - private static spriteSpec: SpriteSpec = SPRITE_SPECS.get(Sprites.FLOOR); - - constructor(width: number) { - super(); - - this.addComponent( - new Sprite( - IMAGES.get(Floor.spriteSpec.states[width].sheet), - { x: 0, y: 0 }, - { width, height: Floor.spriteSpec.height }, - Floor.spriteSpec.msPerFrame, - Floor.spriteSpec.frames - ) - ); - - this.addComponent( - new BoundingBox( - { x: 300, y: 300 }, - { width, height: Floor.spriteSpec.height } - ) - ); - - this.addComponent(new TopCollidable()); - } -} |