private void SaveNewOptionsAndAssign() { Common.GameOptions.Level = this.level; Common.GameOptions.AdvancedFigures = this.advancedFigures; Common.GameOptions.SoundVolume = this.sliders[0].value / 100f; Common.GameOptions.MusicVolume = this.sliders[1].value / 100f; OptionsStreamer.SaveOptions(Common.GameOptions); if (Common.IsGameStarted) { Common.SetupOptions(); Common.SetByHiddenLevel(); } }
public void Start() { Cursor.visible = false; if (!OptionsStreamer.IsFileExist()) { OptionsStreamer.SaveOptions(new GameOptions()); } this.texts = GameObject.FindObjectsOfType <Text>(); if (!Common.IsGameStarted) { Common.GameOptions = OptionsStreamer.LoadOptions(); this.texts[this.index].color = Color.gray; this.texts = this.texts.Where(t => t.text != "Resume").ToArray(); } this.texts[this.index].color = Color.yellow; }