Beispiel #1
0
        public void Init(GameObject asRoot)
        {
            Instance = this;
            go_root  = asRoot;
            as_bgm   = asRoot.AddComponent <AudioSource>();
            AudioClip ac_bgm = Resources.Load <AudioClip>(dic_type_Path[(int)MG_PlayAudioType.BGM]);

            dic_type_ac.Add((int)MG_PlayAudioType.BGM, ac_bgm);
            as_bgm.clip        = ac_bgm;
            as_bgm.loop        = true;
            as_bgm.playOnAwake = false;
            as_bgm.mute        = !MG_SaveManager.MusicOn;
            as_bgm.Play();
        }
Beispiel #2
0
 public void Init(GameObject asRoot)
 {
     Instance = this;
     go_root  = asRoot;
 }