/// <summary> /// Sets the count display for specified game mode. /// </summary> public void SetMapCount(GameModeType gameMode, int count) { var service = ModeManager.GetService(gameMode); if (service == null) { Logger.LogInfo($"Encountered an unsupported gameMode: {gameMode}"); return; } iconSprite.SpriteName = service.GetIconName(32); label.Text = count.ToString("N0"); }
/// <summary> /// Determines the desired audio type from specified url. /// </summary> private AudioType GetAudioType(string url) { if (url.EndsWith("mp3", StringComparison.OrdinalIgnoreCase)) { return(AudioType.MPEG); } else if (url.EndsWith("ogg", StringComparison.OrdinalIgnoreCase)) { return(AudioType.OGGVORBIS); } else if (url.EndsWith("wav", StringComparison.OrdinalIgnoreCase)) { return(AudioType.WAV); } Logger.LogInfo($"AudioRequest.GetAudioType - Unknown audio type for url: {url}"); return(AudioType.UNKNOWN); }