This commit is contained in:
Schluffe
2026-02-25 00:58:53 +01:00
parent 51a0fe38ef
commit 9ab90b579c
9 changed files with 166 additions and 74 deletions
+10 -2
View File
@@ -1,11 +1,19 @@
import { defineEntity } from "#/engine/Entity.ts";
import { createSpriteAnimation, useSpriteSheetSrc } from "#/engine/Sprite.ts";
import { createVector } from "#/engine/Vector";
import { createVector } from "#/engine/Vector.ts";
import portal from "#/game/assets/portal.png";
const portalSheet = await useSpriteSheetSrc(portal, 3, 1);
const sprite = {
src: portalSheet,
xStart: 0,
yStart: 0,
width: 16,
height: 16,
};
defineEntity("portal", {
position: createVector(64, 64),
animation: createSpriteAnimation(portalSheet, 400, 0),
sprite,
animation: createSpriteAnimation(sprite, 400, 0),
});