37 lines
803 B
Lua
37 lines
803 B
Lua
--
|
|
-- DESCRIPTION
|
|
--
|
|
-- @COMPANY **
|
|
-- @AUTHOR **
|
|
-- @DATE ${date} ${time}
|
|
--
|
|
require "World"
|
|
---@type BP_MMOGameInstance_C
|
|
local class = UnLua.Class()
|
|
function class:OverrideInitGame()
|
|
print("OverrideInitGame")
|
|
GA.CreateGlobalVar()
|
|
-- GA.Config.TestBP = pbc.DecodeConfig("BPConfig")
|
|
-- 创建各种message
|
|
local WorldContext = self:GetWorld()
|
|
gWorld:InitializeWorld(WorldContext)
|
|
end
|
|
function class:OverrideWorldChanged(_ , NewWorld)
|
|
if gWorld then
|
|
gWorld:ReInitializeWorld(NewWorld)
|
|
end
|
|
end
|
|
function class:ReceiveBeginPlay()
|
|
print("BP_MMOGameInstance_C ReceiveBeginPlay")
|
|
if gWorld then
|
|
gWorld:beginPlay()
|
|
end
|
|
end
|
|
function class:ReceiveTick(dt)
|
|
if gWorld then
|
|
gWorld:tick(dt)
|
|
gWorld:lateTick(dt)
|
|
end
|
|
end
|
|
|
|
return class |