update: basicspawner( => random)

This commit is contained in:
manhduyhoang90
2026-04-23 08:56:35 +07:00
parent d2e3dbf653
commit fb50541036
6 changed files with 66 additions and 24 deletions

View File

@@ -0,0 +1,30 @@
using Fusion;
using UnityEngine;
public class _PlayerData : NetworkBehaviour
{
[Networked]
public _Role PlayerRole { get; set; }
public override void Spawned()
{
if (Object.HasInputAuthority)
{
SetupByRole(PlayerRole);
}
}
void SetupByRole(_Role role)
{
if (role == _Role.Seeker)
{
Debug.Log("I am Seeker");
// bật flashlight
}
else
{
Debug.Log("I am Trapper");
// bật trap UI
}
}
}