Esempio n. 1
0
    void Start()
    {
        m_currentMenu = m_defaultMenu;
        if (m_showMenus)
        {
            ShowCurrentMenu();
        }
        m_navigationWaitTime = m_navigationDelay;

        m_menuAudio = GetComponentInChildren <MenuAudioManager>();
    }
Esempio n. 2
0
 private void Awake()
 {
     if (!menuAudioManager)
     {
         menuAudioManager = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Esempio n. 3
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        //DontDestroyOnLoad(gameObject);
    }
Esempio n. 4
0
    void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            _instance = this;
        }

        DontDestroyOnLoad(this.gameObject);
    }
Esempio n. 5
0
    // Use this for initialization
    void Awake()
    {
        // Keep the game object Active between scenes
        if (Instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }

        foreach (var Audio in MenuSounds)
        {
            Audio.source      = gameObject.AddComponent <AudioSource>();
            Audio.source.clip = Audio.clip;
            Audio.source.outputAudioMixerGroup = Group;
        }
        Stop();
    }
Esempio n. 6
0
 private void Awake()
 {
     Instance = this;
 }