Example #1
0
 private void OnPlayerNumberingChanged()
 {
     foreach (Player p in PhotonNetwork.PlayerList)
     {
         if (p.ActorNumber == ownerId)
         {
             PlayerColorImage.color = HunterGameSettings.GetPlayerColor(p.GetPlayerNumber());
         }
     }
 }
 public void Init(int playerID)
 {
     targetPlayerID = playerID;
     if (playerID != -1)
     {
         SetFillImageColor(HunterGameSettings.GetPlayerColor(playerID));
     }
     else
     {
         SetFillImageColor(Color.white);
     }
 }
 public void SetText(int playerIndex)
 {
     NameTag.text         = $"Player {(playerIndex+1).ToString()}";
     NameTag.outlineColor = HunterGameSettings.GetPlayerColor(playerIndex);
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     renderer.material.color = HunterGameSettings.GetPlayerColor(playerIndex);
 }