consistent indentation
This commit is contained in:
106
code/game.lua
106
code/game.lua
@@ -1,24 +1,24 @@
|
||||
function GameStep()
|
||||
SetCollisionFlags()
|
||||
if menu_type == "no" then
|
||||
for _, particle in pairs(LoadedParticles) do
|
||||
particle:Smart()
|
||||
end
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
enty:Smart()
|
||||
end
|
||||
end
|
||||
SetCollisionFlags()
|
||||
if menu_type == "no" then
|
||||
for _, particle in pairs(LoadedParticles) do
|
||||
particle:Smart()
|
||||
end
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
enty:Smart()
|
||||
end
|
||||
end
|
||||
|
||||
for _, particle in pairs(LoadedObjects.Particles) do
|
||||
particle:DoPhysics()
|
||||
end
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
enty:DoPhysics()
|
||||
end
|
||||
for _, particle in pairs(LoadedObjects.Particles) do
|
||||
particle:DoPhysics()
|
||||
end
|
||||
for _, enty in pairs(LoadedObjects.Entities) do
|
||||
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)
|
||||
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)
|
||||
|
||||
if Keybind:CheckPressed(Keybind.debug.debug) then
|
||||
if debug then
|
||||
@@ -38,8 +38,8 @@ function GameStep()
|
||||
end
|
||||
|
||||
if Keybind:CheckPressed(Keybind.debug.reload) then
|
||||
MenuClear()
|
||||
menu_type = "dialog"
|
||||
MenuClear()
|
||||
menu_type = "dialog"
|
||||
MenuInit("dialog",DialogSequence.Example)
|
||||
end
|
||||
|
||||
@@ -49,50 +49,50 @@ function GameStep()
|
||||
|
||||
if Keybind:CheckPressed(Keybind.debug.recording) then
|
||||
if DemoRecording then
|
||||
Demo:RecordEnd()
|
||||
else
|
||||
Demo:RecordStart()
|
||||
end
|
||||
Demo:RecordEnd()
|
||||
else
|
||||
Demo:RecordStart()
|
||||
end
|
||||
end
|
||||
|
||||
if Keybind:CheckPressed(Keybind.debug.playback) then
|
||||
if DemoPlayback then
|
||||
Demo:PlaybackEnd()
|
||||
else
|
||||
Demo:PlaybackStart()
|
||||
end
|
||||
end
|
||||
if Keybind:CheckPressed(Keybind.debug.playback) then
|
||||
if DemoPlayback then
|
||||
Demo:PlaybackEnd()
|
||||
else
|
||||
Demo:PlaybackStart()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GameDraw()
|
||||
|
||||
-- prepare
|
||||
GameworldDrawPrepare()
|
||||
GameWorldUpdateLights()
|
||||
-- prepare
|
||||
GameworldDrawPrepare()
|
||||
GameWorldUpdateLights()
|
||||
|
||||
-- background
|
||||
GameworldDrawBackground()
|
||||
GameworldDrawLights()
|
||||
GameworldDrawEntitiesBackground()
|
||||
-- background
|
||||
GameworldDrawBackground()
|
||||
GameworldDrawLights()
|
||||
GameworldDrawEntitiesBackground()
|
||||
|
||||
-- foreground
|
||||
GameworldDrawForeground()
|
||||
GameworldDrawParticles()
|
||||
GameworldDrawEntities()
|
||||
-- foreground
|
||||
GameworldDrawForeground()
|
||||
GameworldDrawParticles()
|
||||
GameworldDrawEntities()
|
||||
|
||||
if LevelData.properties.darkness then
|
||||
GameworldDrawDarkness()
|
||||
end
|
||||
-- end
|
||||
GameworldDrawEnd()
|
||||
if LevelData.properties.darkness then
|
||||
GameworldDrawDarkness()
|
||||
end
|
||||
-- end
|
||||
GameworldDrawEnd()
|
||||
|
||||
-- hud
|
||||
textScale = 1
|
||||
|
||||
-- debug
|
||||
if debug then DebugUI() end
|
||||
if debug_collision then
|
||||
DebugColisions()
|
||||
DebugEntities()
|
||||
end
|
||||
-- debug
|
||||
if debug then DebugUI() end
|
||||
if debug_collision then
|
||||
DebugColisions()
|
||||
DebugEntities()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user