Mothback/data/scripts/game.lua

35 lines
708 B
Lua

function GameStep()
if not do_pause then
SetCollisionFlags(main_Player)
for _, particle in pairs(LoadedParticles) do
particle:Smart()
particle:DoPhysics()
end
for _, enty in pairs(LoadedEntities) do
enty:Smart()
enty:DoPhysics()
end
AnimateTiles()
Camera:positionCenterAt(main_Player.pos.x, main_Player.pos.y)
--camera:positionAt(main_Player.pos.x, main_Player.pos.y,game.width,game.height)
end
end
function GameDraw()
GameworldDraw()
GameworldLighting()
-- hud
textScale = 0.5
-- debug
if debug then DebugUI() end
if debug_collision then
DebugColisions()
DebugEntities()
end
-- pause
if do_pause then PauseUI() end
end