Merge driver.love

This commit is contained in:
Kartik K. Agaram 2023-11-12 20:44:52 -08:00
commit b512c6299a
4 changed files with 12 additions and 4 deletions

View File

@ -10,4 +10,4 @@ on.update = function(dt)
else
set_mouse_cursor('arrow')
end
end
end

View File

@ -1,3 +0,0 @@
Spawn_point = {x=0, y=0}
-- idea: command to move the spawn point around
-- but we don't have a command palette yet

5
0115-round Normal file
View File

@ -0,0 +1,5 @@
round = function(f)
-- apparently this is wrong for one floating point under 0.5
-- there's an alleged better way at https://stackoverflow.com/questions/18313171/lua-rounding-numbers-and-then-truncate/58411671#58411671
return math.floor(f+0.5)
end

6
0116-spawn_point Normal file
View File

@ -0,0 +1,6 @@
spawn_point = function()
return {
x = math.random(Viewport.x, Viewport.x+Viewport.w),
y = math.random(Viewport.y, Viewport.y+Viewport.h),
}
end