Merge driver.love
This commit is contained in:
commit
b512c6299a
|
@ -10,4 +10,4 @@ on.update = function(dt)
|
|||
else
|
||||
set_mouse_cursor('arrow')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue