diff --git a/engine/Entity.ts b/engine/Entity.ts index 5a0bbe5..a14c16f 100644 --- a/engine/Entity.ts +++ b/engine/Entity.ts @@ -1,3 +1,4 @@ +import type { Animation } from "#/engine/Animation.ts"; import { createVector, type Vector } from "#/lib/Vector.ts"; export type Indirect = never; @@ -5,6 +6,7 @@ export type Indirect = never; export type Entity = { name: string; position: Vector; + animation: Animation; } & T; export type Animate = ( @@ -19,7 +21,7 @@ export const entityMap = new Map>(); export const entityAnimateMap = new Map>(); export const entityProcessMap = new Map>(); -export function useEntity( +export function useEntity( meta: { url: string }, state: T, ): {