2017-06-20 01:40:29 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-19 02:15:21 -04:00
|
|
|
dofile("player.lua")
|
|
|
|
dofile("map.lua")
|
2017-06-19 02:46:07 -04:00
|
|
|
dofile("menu.lua")
|
2017-06-20 01:40:29 -04:00
|
|
|
dofile("collision.lua")
|
|
|
|
|
|
|
|
--the scale of the map
|
|
|
|
scale = 12
|
2017-06-19 02:15:21 -04:00
|
|
|
|
|
|
|
function love.draw()
|
|
|
|
maplib.draw()
|
2017-06-19 02:46:07 -04:00
|
|
|
player.draw()
|
|
|
|
menu.draw()
|
2017-06-19 02:15:21 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
function love.load()
|
|
|
|
maplib.createmap()
|
2017-06-20 01:59:18 -04:00
|
|
|
|
2017-06-19 02:46:07 -04:00
|
|
|
font = love.graphics.newFont("font.ttf", 12)
|
|
|
|
fontmed = love.graphics.newFont("font.ttf", 22)
|
|
|
|
fontbig = love.graphics.newFont("font.ttf", 35)
|
2017-06-20 01:59:18 -04:00
|
|
|
|
2017-06-19 02:46:07 -04:00
|
|
|
love.graphics.setFont(font)
|
2017-06-20 01:59:18 -04:00
|
|
|
|
2017-06-20 02:16:21 -04:00
|
|
|
|
2017-06-20 01:59:18 -04:00
|
|
|
minesound = love.audio.newSource("mine.ogg", "static")
|
2017-06-20 02:16:21 -04:00
|
|
|
placesound = love.audio.newSource("place.ogg", "static")
|
2017-06-19 02:15:21 -04:00
|
|
|
end
|
|
|
|
|
2017-06-20 03:09:33 -04:00
|
|
|
function love.quit( )
|
|
|
|
print("Thanks for playing!")
|
|
|
|
return nil
|
2017-06-20 02:58:58 -04:00
|
|
|
end
|
2017-06-19 02:15:21 -04:00
|
|
|
|
|
|
|
function love.update(dt)
|
2017-06-19 02:46:07 -04:00
|
|
|
menu.animate()
|
2017-06-20 03:19:57 -04:00
|
|
|
mine(key)
|
2017-06-20 03:39:40 -04:00
|
|
|
gravity(dt)
|
2017-06-19 02:15:21 -04:00
|
|
|
end
|