WIP
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { type Box, box } from "#/engine/Box.ts";
|
||||
import { type Circle, createCircle } from "#/engine/Circle.ts";
|
||||
import { moveAndCollide } from "#/engine/Collision.ts";
|
||||
import { defineEntity } from "#/engine/Entity.ts";
|
||||
import { defineEntity, type Process } from "#/engine/Entity.ts";
|
||||
import { keyboardInput } from "#/engine/Keyboard.ts";
|
||||
import { pointer } from "#/engine/Pointer.ts";
|
||||
import { def } from "#/engine/Scene.ts";
|
||||
import {
|
||||
createSpriteAnimation,
|
||||
type Sprite,
|
||||
@@ -39,6 +40,10 @@ const state: Hero = {
|
||||
animation: box(createSpriteAnimation(sprite, 500, 2)),
|
||||
};
|
||||
|
||||
const $ = def("hero");
|
||||
$<Vector>("position", createVector());
|
||||
$<Process>("process", (_id, _delta) => {});
|
||||
|
||||
const process = defineEntity("hero", state);
|
||||
|
||||
process((entity, delta) => {
|
||||
|
||||
Reference in New Issue
Block a user