コード例 #1
0
ファイル: BGaudio.cs プロジェクト: soilshubham/BrightGiffy
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        DontDestroyOnLoad(this.gameObject);

        bgmAudio = this.GetComponent <AudioSource>();
    }
コード例 #2
0
 public void StopBGSound()
 {
     BGaudio.Stop();
 }
コード例 #3
0
 public void PlayBGSound()
 {
     BGaudio.clip = BGClip;
     BGaudio.Play();
 }