protected override void Select() { if (ButtonState != ButtonState.Disabled && ButtonState != ButtonState.Pressed) { ButtonPressedSound.Play(Options.SFXVolume, 0, 0); base.Select(); ButtonState = ButtonState.Pressed; pressedTime = TimeSpan.FromSeconds(0); IsSelected = false; } }
// Use this for initialization void Start() { if (instance != null) { Destroy(gameObject); } else { instance = this; GameObject.DontDestroyOnLoad(gameObject); } audioSources = GetComponents <AudioSource>(); }