Пример #1
0
        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;
            }
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        if (instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            instance = this;
            GameObject.DontDestroyOnLoad(gameObject);
        }

        audioSources = GetComponents <AudioSource>();
    }