public void Unlock(Player.Team team) { HasMoved = false; HasAttacked = false; Color color = (team == Player.Team.Blue) ? Color.green : Color.red; GetComponent <SpriteRenderer>().color = color; }
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(); } }
/// <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); } }
public void CmdSwitchTeam() { Player.Team team = (this.team == Player.Team.Blue) ? Player.Team.Red : Player.Team.Blue; this.team = team; }