48 lines
1.2 KiB
Lua
48 lines
1.2 KiB
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
|
|
function class:UploadLuaCallError(ErrorMsg)
|
|
print("ouczbs::UploadLuaCallError", ErrorMsg)
|
|
local EMSentrySubsystem = UE.USubsystemBlueprintLibrary.GetWorldSubsystem(self, UE.UEMSentrySubsystem)
|
|
if EMSentrySubsystem then
|
|
SceneId = 101
|
|
SceneName = "Login"
|
|
PlayerLocation = "10.2,20.30,40.30"
|
|
EMSentrySubsystem:ReportLuaTrace(ErrorMsg, {
|
|
SceneId = SceneId, SceneName = tostring(SceneName), Location = PlayerLocation
|
|
})
|
|
end
|
|
end
|
|
return class |