x and y is not local, dumbass
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user