Files
UnrealLuaDemo/Script/lua/Game/LuaPlayerController.lua
T

23 lines
905 B
Lua

local Log = require("Framework.Log")
local EventBus = require("Framework.EventBus")
local HotReload = require("Framework.HotReload")
local LuaPlayerController = UnLua.Class()
function LuaPlayerController.ReceiveBeginPlay(self)
Log.Info("LuaPlayerController:ReceiveBeginPlay() - Ready for [Space]=Ping, [R]=HotReload")
end
function LuaPlayerController.OnDemoPingPressed(self)
Log.Info("LuaPlayerController:OnDemoPingPressed() -> Emitting Demo.Ping")
EventBus.Emit("Demo.Ping", "LuaPlayerController")
end
function LuaPlayerController.OnDemoHotReloadPressed(self)
Log.Info("LuaPlayerController:OnDemoHotReloadPressed() -> Triggering HotReload.ReloadAll()")
HotReload.ReloadAll()
end
function LuaPlayerController.ReceiveEndPlay(self, EndPlayReason)
Log.Info(
"LuaPlayerController:ReceiveEndPlay(reason=%s)",
tostring(EndPlayReason)
)
end
return LuaPlayerController