2017-06-22 02:27:43 -04:00
|
|
|
--the directory
|
|
|
|
dir = love.filesystem.getAppdataDirectory( )
|
2017-06-20 01:40:29 -04:00
|
|
|
|
2017-06-22 03:38:12 -04:00
|
|
|
math.randomseed(os.time())
|
|
|
|
|
2017-06-22 02:27:43 -04:00
|
|
|
dofile("tserial.lua")
|
2017-06-28 02:21:20 -04:00
|
|
|
dofile("ore.lua")
|
2017-06-19 02:15:21 -04:00
|
|
|
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")
|
2017-06-22 03:38:12 -04:00
|
|
|
dofile("player.lua")
|
2017-06-20 01:40:29 -04:00
|
|
|
|
|
|
|
--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-20 03:44:53 -04:00
|
|
|
stepsound = love.audio.newSource("step.ogg", "static")
|
2017-06-20 03:49:11 -04:00
|
|
|
oof = love.audio.newSource("oof.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-07-07 01:13:55 -04:00
|
|
|
player.move_camera(dt)
|
2017-06-19 02:15:21 -04:00
|
|
|
end
|