2026-11-28 01:45:03 +08:00
|
|
|
---@type LuaPlayerController
|
|
|
|
|
local M = UnLua.Class()
|
|
|
|
|
|
|
|
|
|
local Log = require("Framework.Log")
|
2026-11-28 15:48:35 +08:00
|
|
|
local EventBus = require("Framework.EventBus")
|
|
|
|
|
local HotReload = require("Framework.HotReload")
|
2026-11-28 01:45:03 +08:00
|
|
|
|
|
|
|
|
function M:ReceiveBeginPlay()
|
2026-11-28 15:48:35 +08:00
|
|
|
Log.Info("LuaPlayerController:ReceiveBeginPlay() - Ready for [Space]=Ping, [R]=HotReload")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:OnDemoPingPressed()
|
|
|
|
|
Log.Info("LuaPlayerController:OnDemoPingPressed() -> Emitting Demo.Ping")
|
|
|
|
|
EventBus.Emit("Demo.Ping", "LuaPlayerController")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:OnDemoHotReloadPressed()
|
|
|
|
|
Log.Info("LuaPlayerController:OnDemoHotReloadPressed() -> Triggering HotReload.ReloadAll()")
|
|
|
|
|
HotReload.ReloadAll()
|
2026-11-28 01:45:03 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:ReceiveEndPlay(EndPlayReason)
|
|
|
|
|
Log.Info("LuaPlayerController:ReceiveEndPlay(reason=%s)", tostring(EndPlayReason))
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|