2022-01-19 15:13:13 +00:00
|
|
|
function GameStep()
|
2022-01-18 12:53:58 +00:00
|
|
|
if not do_pause then
|
|
|
|
SetCollisionFlags(main_Player)
|
|
|
|
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
|
|
|
|
|
2022-01-19 15:13:13 +00:00
|
|
|
function GameDraw()
|
2022-01-18 12:53:58 +00:00
|
|
|
|
2022-01-19 15:13:13 +00:00
|
|
|
GameworldDraw()
|
|
|
|
GameworldLighting()
|
2022-01-18 12:53:58 +00:00
|
|
|
|
2022-01-19 20:57:45 +00:00
|
|
|
-- hud
|
2022-01-18 12:53:58 +00:00
|
|
|
textScale = 0.5
|
|
|
|
|
2022-01-19 20:57:45 +00:00
|
|
|
-- pause
|
2022-01-18 12:53:58 +00:00
|
|
|
if do_pause then PauseUI() end
|
2022-01-19 20:57:45 +00:00
|
|
|
|
|
|
|
-- debug
|
|
|
|
if debug then DebugUI() end
|
|
|
|
if debug_collision then
|
|
|
|
DebugColisions()
|
|
|
|
DebugEntities()
|
|
|
|
end
|
2022-01-18 12:53:58 +00:00
|
|
|
end
|