private void HandleOptionsEvent(OptionsEventInfo obj) { switch (obj.Type) { case OptionsType.Toggle: ToggleOptions(); break; default: throw new ArgumentOutOfRangeException(); } }
private void HandleEvent(OptionsEventInfo optionsEventInfo) { switch (optionsEventInfo.Type) { case OptionsType.Toggle: if (uiButtonObject != null) { uiButtonObject.Text = uiButtonObject.Text.Equals("Easy") ? "Hard" : "Easy"; uiButtonObject.Texture = uiButtonObject.Text.Equals("Easy") ? textureEasy : textureHard; } break; default: throw new ArgumentOutOfRangeException(); } }