Files
BusyRabbit/Content/Lua/Level/LevelPlayerState.lua
2025-09-28 01:32:54 +08:00

12 lines
368 B
Lua

local GameplayStatics = import("GameplayStatics")
local LevelPlayerState = {}
function LevelPlayerState:ReceiveBeginPlay()
local pc = GameplayStatics.GetPlayerController(self, 0)
local role = self:CreateRoleRoster(pc)
print("LevelPlayerState:ReceiveBeginPlay", role, self:HasAuthority())
pc:Possess(role)
end
return Class(nil, nil, LevelPlayerState)