Files
tramussos/data/game.lua
Raimon Zamora 16b45ecf45 - [NEW] Passat a delta time
- [NEW] Nous tiles
- [NEW] Batman ja puja i baixa per cordes/cadenes
- [NEW] El batarang es mes visible
- [NEW] el ganxo es mes visible
2025-11-10 12:19:17 +01:00

40 lines
887 B
Lua

require "mapa"
require "batman"
require "batarang"
game = {
num = 1,
map_surf = {nil,nil},
init = function(level)
game_update = game.update
mapa.load(level)
batman.init()
sys.beat(5)
end,
update = function()
local cam_x, cam_y = -(batman.x-7*8),-(batman.y-6*8)
if (cam_x>0) then cam_x=0 end
if (cam_y>0) then cam_y=0 end
view.origin(cam_x,cam_y)
surf.cls(66)
mapa.draw(1)
batarang.draw()
if batman.layer==1 then batman.draw() end
mapa.draw(2)
if batman.layer==2 then batman.draw() end
--if sys.beat() then
batman.update()
batarang.update()
--end
--view.origin(0,0)
--draw.text(tostring(mx//8)..","..tostring(my//8),50,0,22)
--text(tostring(editor.current_layer),0,0,22,42)
end,
}