feat: upgrade to ts2lua-unreal v0.3.0 and refactor Game classes to pure C++ callback + TS composition hot-reload
This commit is contained in:
1 parent
4ad4a8f36f
commit
783dccf53d
64 files changed
+2368
-714
No files matched your search
@@ -1,20 +1,21 @@
|
||||
local Log = require("Framework.Log")
|
||||
local LuaGameMode = UnLua.Class()
|
||||
function LuaGameMode.ReceiveBeginPlay(self)
|
||||
Log.Info("LuaGameMode:ReceiveBeginPlay() - Demo scene started")
|
||||
local ____exports = __module.env
|
||||
local Log = __MODULE__.Import("Framework.Log", __module)
|
||||
function ____exports.OnBeginPlay(gameMode)
|
||||
Log.Info("LuaGameMode.OnBeginPlay() - Demo scene started")
|
||||
UE.UKismetSystemLibrary.PrintString(
|
||||
self,
|
||||
"[UnLua Demo] LuaGameMode initialized!",
|
||||
gameMode,
|
||||
"[UnLua Demo] LuaGameMode initialized (Pure TS Callback Mode)!",
|
||||
true,
|
||||
true,
|
||||
UE.FLinearColor(0.3, 0.85, 1, 1),
|
||||
5
|
||||
)
|
||||
end
|
||||
function LuaGameMode.ReceiveEndPlay(self, EndPlayReason)
|
||||
function ____exports.OnEndPlay(_gameMode, endPlayReason)
|
||||
Log.Info(
|
||||
"LuaGameMode:ReceiveEndPlay(reason=%s)",
|
||||
tostring(EndPlayReason)
|
||||
"LuaGameMode.OnEndPlay(reason=%s)",
|
||||
tostring(endPlayReason)
|
||||
)
|
||||
end
|
||||
return LuaGameMode
|
||||
function __module.UpdateImports()
|
||||
end
|
||||
Reference in new issue
Block a user