Пример #1
0
    public void Unlock(Player.Team team)
    {
        HasMoved    = false;
        HasAttacked = false;
        Color color = (team == Player.Team.Blue) ? Color.green : Color.red;

        GetComponent <SpriteRenderer>().color = color;
    }
Пример #2
0
 public void OnClickSwitchTeam()
 {
     if (GameManager.playerType == GameManager.PlayerType.Master)
     {
         Player.Team team = (player.team == Player.Team.Blue) ? Player.Team.Red : Player.Team.Blue;
         player.team = team;
         RoomUIController.Instance.SwitchTeam();
     }
     else
     {
         player.CmdSwitchTeam();
     }
 }
Пример #3
0
 /// <summary>
 /// Calls the end of the round.
 /// </summary>
 /// <param name="team">Winner team.</param>
 public void EndRound(Player.Team team)
 {
     if (team == Player.Team.Murderer)
     {
         OnChangeRoundState(RoundState.END);
         ServerSend.RoundState((int)RoundState.END);
         ServerSend.RoundEnd((int)team);
     }
     else if (team == Player.Team.Bystander)
     {
         OnChangeRoundState(RoundState.END);
         ServerSend.RoundState((int)RoundState.END);
         ServerSend.RoundEnd((int)team);
     }
 }
Пример #4
0
 public void CmdSwitchTeam()
 {
     Player.Team team = (this.team == Player.Team.Blue) ? Player.Team.Red : Player.Team.Blue;
     this.team = team;
 }