This commit is contained in:
Schluffe
2026-05-28 19:53:31 +02:00
parent 6a960d7785
commit f8efda0ada
5 changed files with 17 additions and 14 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ const process = defineEntity("hero", {
});
createEffect(() => {
console.log(speed());
console.log("speed: ", speed());
});
let onceGuard = true;
+3
View File
@@ -83,6 +83,9 @@ process((id, delta) => {
velocity.x = stuff.value * 0.05;
position.x += velocity.x * delta;
// @ts-ignore
window.viewport = viewport;
if (position.x + collider.offset.x > viewport.canvas.width - 16) {
stuff.value = -1;
animation.value = animations.walk;