public void SetSliderLabel() { label.text = slider.value.ToString(); if (Settings.playerSettings.useSettings) { switch (whichSlider) { case WhichSlider.RenderDst: Settings.playerSettings.renderDst = (int)slider.value; break; case WhichSlider.Speed: Settings.playerSettings.speed = (float)slider.value; break; case WhichSlider.TurnSpeed: Settings.playerSettings.turnSpeed = (float)slider.value; break; } SaveLabel.SetToSave(); } }
public void SetTheColor(Color colorInMenu) { switch (whichColor) { case WhichColor.PlayerColor: if (Settings.playerSettings.useSettings) { Settings.playerSettings.playerColor = colorInMenu; SaveLabel.SetToSave(); } break; case WhichColor.ParticleColor: if (Settings.playerSettings.useSettings) { Settings.playerSettings.particleColor = colorInMenu; SaveLabel.SetToSave(); } break; case WhichColor.Safezone: if (Settings.playerSettings.useSettings) { Settings.playerSettings.safezone = colorInMenu; SaveLabel.SetToSave(); } break; case WhichColor.Killzone: if (Settings.playerSettings.useSettings) { Settings.playerSettings.killzone = colorInMenu; SaveLabel.SetToSave(); } break; } }
public void ResetSliderLabel() { switch (whichSlider) { case WhichSlider.RenderDst: slider.value = (float)Settings.playerSettings.renderDst; label.text = slider.value.ToString(); SaveLabel.SetToSave(); break; case WhichSlider.Speed: print("hi"); slider.value = (float)Settings.playerSettings.speed; label.text = slider.value.ToString(); SaveLabel.SetToSave(); break; case WhichSlider.TurnSpeed: slider.value = (float)Settings.playerSettings.turnSpeed; label.text = slider.value.ToString(); SaveLabel.SetToSave(); break; } }