Пример #1
0
        private void Awake()
        {
            if (Instance != null && Instance != this)
            {
                Destroy(this.gameObject);
            }
            if (Instance == null)
            {
                Instance = this;
            }

            DontDestroyOnLoad(this.gameObject);

            audioSource = this.GetComponent <AudioSource>();
        }
 public void Start()
 {
     Singleton = this;
     Singleton._currentPlayingSounds     = new Dictionary <string, int>();
     Singleton._currentPlayingSoundsLock = new Dictionary <string, bool>();
 }