alunizaje/assets/scripts/camera.lua
Andros Fenollosa 8b012de054 Add camera
2016-11-27 12:31:56 +01:00

15 lines
363 B
Lua

local gamera = require 'assets/scripts/vendor/gamera'
camera = {}
local limit = 200
function camera.load(game)
camera.gcam = gamera.new(0, 0, game.window.width, game.window.height)
camera.gcam:setWorld(0, 0, game.canvas.width, game.canvas.height)
end
function camera.update(game, spaceship)
camera.gcam:setPosition(0, spaceship.y + limit)
end
return camera