love:mike moved function into it's own library; moved libs to lib folder

This commit is contained in:
Logen Kain 2017-07-05 07:22:58 -07:00
parent 7e844925e8
commit f028d9d4fe
4 changed files with 17 additions and 17 deletions

View File

@ -0,0 +1,14 @@
function col_detect(object, display)
if not (object.x >= -1 and
object.x <= (display.width - object.width)) then
return false
end
if not (object.y >= -1 and
object.y <= (display.height - object.height)) then
return false
end
return true
end

View File

@ -1,4 +1,4 @@
require "Tserial"
require "lib/Tserial"
function love.keyreleased(key)
if key == "q" then

View File

@ -1,19 +1,5 @@
require "keys"
-- Make this more functional. It shouldn't depend on global state.
function col_detect(object, display)
if not (object.x >= -1 and
object.x <= (display.width - object.width)) then
return false
end
if not (object.y >= -1 and
object.y <= (display.height - object.height)) then
return false
end
return true
end
require "lib/keys"
require "lib/functions"
function love.load()
saveFile = "test.lua"