summaryrefslogtreecommitdiff
path: root/src/engine/config
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 22:04:57 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-01 22:04:57 -0700
commit55024f44c3713049c68e4f3f23ecdc3633cd4a24 (patch)
tree5989a20209f7b1e3a06f2eeca70b56a9bd2f7995 /src/engine/config
parentc3242b171cdbb36a26fda04c7148b9b40a5f5c33 (diff)
downloadthe-abstraction-engine-55024f44c3713049c68e4f3f23ecdc3633cd4a24.tar.gz
the-abstraction-engine-55024f44c3713049c68e4f3f23ecdc3633cd4a24.zip
add function box entity
Diffstat (limited to 'src/engine/config')
-rw-r--r--src/engine/config/assets.ts3
-rw-r--r--src/engine/config/sprites.ts11
2 files changed, 11 insertions, 3 deletions
diff --git a/src/engine/config/assets.ts b/src/engine/config/assets.ts
index 173bab3..bf41461 100644
--- a/src/engine/config/assets.ts
+++ b/src/engine/config/assets.ts
@@ -1,5 +1,4 @@
-import type { SpriteSpec } from "./sprites";
-import { SPRITE_SPECS } from "./sprites";
+import { type SpriteSpec, SPRITE_SPECS } from ".";
export const IMAGES = new Map<string, HTMLImageElement>();
diff --git a/src/engine/config/sprites.ts b/src/engine/config/sprites.ts
index 37185fd..e62d714 100644
--- a/src/engine/config/sprites.ts
+++ b/src/engine/config/sprites.ts
@@ -2,6 +2,7 @@ import { Direction } from "../interfaces/Direction";
export enum Sprites {
PLAYER,
+ FUNCTION_BOX,
}
export interface SpriteSpec {
@@ -35,5 +36,13 @@ playerSpriteSpec.states.set(Direction.NONE, {
});
},
);
-
SPRITE_SPECS.set(Sprites.PLAYER, playerSpriteSpec);
+
+const functionBoxSpriteSpec = {
+ msPerFrame: 200,
+ width: 64,
+ height: 64,
+ frames: 3,
+ sheet: "/assets/border.png",
+};
+SPRITE_SPECS.set(Sprites.FUNCTION_BOX, functionBoxSpriteSpec);