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)
|
2022-01-19 23:53:59 +00:00
|
|
|
for _, particle in pairs(LoadedParticles) do
|
|
|
|
particle:Smart()
|
|
|
|
particle:DoPhysics()
|
|
|
|
end
|
2022-01-18 12:53:58 +00:00
|
|
|
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
|
|
|
-- debug
|
|
|
|
if debug then DebugUI() end
|
|
|
|
if debug_collision then
|
|
|
|
DebugColisions()
|
|
|
|
DebugEntities()
|
|
|
|
end
|
2022-01-18 12:53:58 +00:00
|
|
|
end
|