Esempio n. 1
0
    void Update()
    {
        if (LoadScene.GetCurrentSceneName() != "TitleScene" && LoadScene.GetCurrentSceneName() != "Video")
        {
            if (GameManager.Instance.gameObject.GetComponent <StopBGMManager>().BGM.isPlaying)
            {
                if (BGM.isPlaying)
                {
                    BGM.Pause();
                }
            }
            else
            {
                if (!BGM.isPlaying)
                {
                    BGM.Play();
                }
            }
        }
        if (LoadScene.GetCurrentSceneName() == "Video")
        {
            if (BGM.isPlaying)
            {
                BGM.Pause();
            }
        }

        //ヴォリュームを変わる
        if (BGM.volume != Volume)
        {
            BGM.volume = Volume;
        }
    }