alunizaje/main.lua
Andros Fenollosa 182fc3e8a5 Update moon
2016-11-27 13:25:40 +01:00

47 lines
991 B
Lua

local game = require 'assets/scripts/game'
local background = require 'assets/scripts/background'
local spaceship = require 'assets/scripts/spaceship'
local asteroids = require 'assets/scripts/asteroids'
local moon = require 'assets/scripts/moon'
local controls = require 'assets/scripts/controls'
local camera = require 'assets/scripts/camera'
-- LOAD
function love.load()
game.load()
camera.load(game)
background.load(game)
asteroids.load(game)
moon.load(game)
spaceship.load(game)
end
-- UPDATE
function love.update(dt)
game.world:update(dt)
background.update(dt)
asteroids.update(dt, game)
moon.update()
spaceship.update(dt)
camera.update(game, spaceship)
controls.update(dt)
end
-- DRAW
function love.draw()
camera.gcam:draw(function(l,t,w,h)
background.draw()
moon.draw()
spaceship.draw()
asteroids.draw()
end)
end
-- CONTROLS
function love.keyreleased(key)
-- sounds.keyreleased(key)
end
function love.mousereleased(key)
-- sounds.mousereleased(key)
end