Open-Terrarium/main.lua
2017-07-07 01:13:55 -04:00

49 lines
928 B
Lua

--the directory
dir = love.filesystem.getAppdataDirectory( )
math.randomseed(os.time())
dofile("tserial.lua")
dofile("ore.lua")
dofile("map.lua")
dofile("menu.lua")
dofile("collision.lua")
dofile("player.lua")
--the scale of the map
scale = 12
function love.draw()
maplib.draw()
player.draw()
menu.draw()
end
function love.load()
maplib.createmap()
font = love.graphics.newFont("font.ttf", 12)
fontmed = love.graphics.newFont("font.ttf", 22)
fontbig = love.graphics.newFont("font.ttf", 35)
love.graphics.setFont(font)
minesound = love.audio.newSource("mine.ogg", "static")
placesound = love.audio.newSource("place.ogg", "static")
stepsound = love.audio.newSource("step.ogg", "static")
oof = love.audio.newSource("oof.ogg", "static")
end
function love.quit( )
print("Thanks for playing!")
return nil
end
function love.update(dt)
menu.animate()
mine(key)
gravity(dt)
player.move_camera(dt)
end