make sim use proper OOP

This commit is contained in:
Redo0
2021-05-25 14:18:13 -05:00
parent 0963ef8ca8
commit be2df1ef33
8 changed files with 74 additions and 56 deletions

View File

@@ -48,7 +48,7 @@ local lastfxtime = 0
local avgticks = {}
local totalticks = 0
local sim = Simulation:new()
local sim = Simulation.new(Simulation)
local units = {
"uHz",
@@ -322,12 +322,12 @@ while 1 do
if OPT_TICK_TIME==0 then
for i = 1, OPT_TICK_INF do
sim:tick()
Simulation.tick(sim)
end
ticks = ticks+OPT_TICK_INF
else
for i = 1, OPT_TICK_MULT do
sim:tick()
Simulation.tick(sim)
ticks = ticks+1
local elapsed = os.clock()-time