private string ParseGroup(PlayerRank group) { switch (group) { case PlayerRank.Administrateurs: return("♛Administrateurs"); case PlayerRank.Robots: return("☎"); case PlayerRank.Moderateurs: return("♝Modérateurs"); case PlayerRank.Animateurs: return("♞Animateurs"); case PlayerRank.Developpeurs: return("♣Développeur"); case PlayerRank.Rulers: return("♟Rullers"); default: return(group.ToString()); } }
/// <summary> /// Updates the game HUD. /// </summary> /// <param name="score">The player's score.</param> /// <param name="lives">The player's lives remaining.</param> /// <param name="rank">The player's rank.</param> public void UpdateHUD(int score, int lives, PlayerRank rank) { scoreText.text = string.Format(LocalizationManager.Instance.GetString("HUD Score"), score.ToString()); livesText.text = string.Format(LocalizationManager.Instance.GetString("HUD Lives"), lives.ToString()); string rankKey = "Rank " + rank.ToString(); rankText.text = string.Format(LocalizationManager.Instance.GetString("HUD Rank"), LocalizationManager.Instance.GetString(rankKey)); }
/// <summary> /// Updates HUD rank text. /// </summary> /// <param name="rank">Rank.</param> void ShowRank(PlayerRank rank) { string rankKey = "Rank " + rank.ToString(); rankText.text = string.Format(LocalizationManager.Instance.GetString("HUD Rank"), LocalizationManager.Instance.GetString(rankKey)); }