initial commit

This commit is contained in:
harper
2026-05-14 20:14:48 -07:00
commit 9d65ca32c4
11 changed files with 846 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
vector = {}
vector.utils = {}
function vec(x, y)
return {
x = x,
y = y,
}
end
function vector.utils.input_vector()
local vec = { x = 0, y = 0 }
vec.x = vector.utils.bool_to_int(input.held(input.RIGHT)) - vector.utils.bool_to_int(input.held(input.LEFT))
vec.y = vector.utils.bool_to_int(input.held(input.DOWN)) - vector.utils.bool_to_int(input.held(input.UP))
return vec
end
function vector.utils.bool_to_int(b)
if b == true then
return 1
else
return 0
end
end