Add basic controls
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { createAnimation, playAnimation } from "#/engine/Animation.ts";
|
||||
import { useEntity } from "#/engine/Entity.ts";
|
||||
import { defineEntity } from "#/engine/Entity.ts";
|
||||
import { fromSrc, type Sprite } from "#/lib/Sprite.ts";
|
||||
|
||||
const idle: Sprite = await fromSrc("/assets/hero/idle.png", 5, 4);
|
||||
|
||||
const { animate, process } = useEntity(import.meta, {
|
||||
const { animate, process } = defineEntity("barEntity", {
|
||||
animation: createAnimation(idle, 200, 0),
|
||||
stuff: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user