x and y is not local, dumbass

This commit is contained in:
2026-02-12 15:24:34 +01:00
parent a622f8560b
commit 5b27529cf8

View File

@@ -16,8 +16,8 @@ local speed = 20
local size = 3
function update(delta: number)
local x = x + speed * delta * x_direction
local y = y + speed * delta * y_direction
x = x + speed * delta * x_direction
y = y + speed * delta * y_direction
if x <= size or x >= width - size then
x_direction = -x_direction
@@ -35,6 +35,8 @@ function update(delta: number)
g13.clear()
print(x, y)
for sy = -size,size do
for sx = -size,size do
g13.set_pixel(x + sx, y + sy, true)