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

24 lines
911 B
Lua

local ____exports = __module.env
local Log = __MODULE__.Import("Framework.Log", __module)
local EventBus = __MODULE__.Import("Framework.EventBus", __module)
local HotReload = __MODULE__.Import("Framework.HotReload", __module)
function ____exports.OnBeginPlay(_pc)
Log.Info("LuaPlayerController.OnBeginPlay() - Ready for [Space]=Ping, [R]=HotReload")
end
function ____exports.OnDemoPingPressed(_pc)
Log.Info("LuaPlayerController.OnDemoPingPressed() -> Emitting Demo.Ping")
EventBus.Emit("Demo.Ping", "LuaPlayerController")
end
function ____exports.OnDemoHotReloadPressed(_pc)
Log.Info("LuaPlayerController.OnDemoHotReloadPressed() -> Triggering HotReload.ReloadAll()")
HotReload.ReloadAll()
end
function ____exports.OnEndPlay(_pc, endPlayReason)
Log.Info(
"LuaPlayerController.OnEndPlay(reason=%s)",
tostring(endPlayReason)
)
end
function __module.UpdateImports()
end