コード例 #1
0
    private IEnumerator CheckProcess()
    {
        while (isTicking == true && IsPlaying() == true)
        {
            yield return(new WaitForSeconds(0.05f));

            if (currentSound.HasLoop())
            {
                switch (currentPlayingType)
                {
                case MusicPlayingType.SourceA:
                    currentSound.CheckLoop(fadeA_audio);
                    break;

                case MusicPlayingType.SourceB:
                    currentSound.CheckLoop(fadeB_audio);
                    break;

                case MusicPlayingType.AtoB:
                    lastSound.CheckLoop(fadeA_audio);
                    currentSound.CheckLoop(fadeB_audio);
                    break;

                case MusicPlayingType.BtoA:
                    lastSound.CheckLoop(fadeB_audio);
                    currentSound.CheckLoop(fadeA_audio);
                    break;
                }
            }
        }
    }
コード例 #2
0
    private IEnumerator CheckProcess()
    {
        while (this.isTicking == true && IsPlaying())
        {
            yield return(new WaitForSeconds(0.05f));

            if (this.currentSound.HasLoop())
            {
                if (currentPlayingType == MusicPlayingType.SourceA)
                {
                    currentSound.CheckLoop(fadeA_audio);
                }
                else if (currentPlayingType == MusicPlayingType.SourceB)
                {
                    currentSound.CheckLoop(fadeB_audio);
                }
                else if (currentPlayingType == MusicPlayingType.AtoB)
                {
                    this.lastSound.CheckLoop(fadeA_audio);
                    this.currentSound.CheckLoop(fadeB_audio);
                }
                else if (currentPlayingType == MusicPlayingType.BtoA)
                {
                    this.lastSound.CheckLoop(fadeB_audio);
                    this.currentSound.CheckLoop(fadeA_audio);
                }
            }
        }
    }