local all the things

This commit is contained in:
2026-02-12 14:35:15 +01:00
parent 4a56e7d1dd
commit a622f8560b

View File

@@ -16,8 +16,8 @@ local speed = 20
local size = 3
function update(delta: number)
x = x + speed * delta * x_direction
y = y + speed * delta * y_direction
local x = x + speed * delta * x_direction
local y = y + speed * delta * y_direction
if x <= size or x >= width - size then
x_direction = -x_direction
@@ -27,9 +27,9 @@ function update(delta: number)
y_direction = -y_direction
end
color_x = (x / width) * 255
color_y = (y / height) * 255
color_z = 255 - (color_x + color_y) / 2
local color_x = (x / width) * 255
local color_y = (y / height) * 255
local color_z = 255 - (color_x + color_y) / 2
g13.set_color(color_x/2, color_y/2, color_z/2)