From 2c24af53829edaf2b6473a438d74adcdac1fdc96 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sun, 16 Mar 2025 21:31:13 +0800 Subject: refactor: clearer initialization code --- utils/bodyLifecycleManager.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils/bodyLifecycleManager.lua') diff --git a/utils/bodyLifecycleManager.lua b/utils/bodyLifecycleManager.lua index 219537c..6afbcb1 100644 --- a/utils/bodyLifecycleManager.lua +++ b/utils/bodyLifecycleManager.lua @@ -10,6 +10,10 @@ function bodyLifeCycleManager.new() return self end +function bodyLifeCycleManager.init(G) + G.BodyLifeCycleManager = bodyLifeCycleManager.new() +end + function bodyLifeCycleManager:create(object, shape, bodyType, sensor) table.insert( self.toCreate, -- cgit v1.2.3