42 lines
938 B
Lua
Raw Permalink Normal View History

2025-01-04 23:00:19 +08:00
require('Script.Global.GlobalLogic.LogicConfig')
GlobalInit = GlobalInit or {}
function GlobalInit.Init()
GlobalInit.ServerAndClientInit()
if UGCGameSystem.IsServer() then
GlobalInit.ServerInit()
else
GlobalInit.ClientInit()
end
for i, v in pairs(LogicConfig.RequireList) do
local GlobalLogicInst = require(v)
if GlobalLogicInst.Init then
GlobalLogicInst.Init()
end
end
end
function GlobalInit.ServerAndClientInit()
EventManager.InitEventManager()
end
function GlobalInit.ServerInit()
end
function GlobalInit.ClientInit()
end
function GlobalInit.SpawnActorFromPath(AssetClass)
return UGCGameSystem.SpawnActor(
UGCGameSystem.GameState,
AssetClass,
VectorHelper.VectorZero(),
VectorHelper.RotZero(),
VectorHelper.ScaleOne(),
UGCGameSystem.GameState
)
end
return GlobalInit