12 lines
		
	
	
		
			368 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			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) |