WIP
This commit is contained in:
@@ -34,7 +34,7 @@ const process = defineEntity("hero", {
|
||||
});
|
||||
|
||||
createEffect(() => {
|
||||
console.log(speed());
|
||||
console.log("speed: ", speed());
|
||||
});
|
||||
|
||||
let onceGuard = true;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user