Exemple #1
0
        private void ChangeEvent(float time)
        {
            if (iter >= data.Length)
            {
                return;
            }
            IEVDData evddata = data[iter];

            while (time >= evddata.Time)
            {
                switch (evddata.EventType)
                {
                case EventType.ChangeBPM:
                    var cbe = evddata as ChangeBPMEvent;
                    BPMManager.TargetBPM = cbe.BPM;
                    break;

                case EventType.ChangeSoundPlayMode:
                    var cspme = evddata as ChangeSoundPlayModeEvent;
                    keepPlayings[cspme.Channel - 1] = cspme.KeepPlaying;
                    break;

                case EventType.ChangeVolume:
                    var cve = evddata as ChangeVolumeEvent;
                    if (cve.Channel == 0)
                    {
                        if (ChangeMovieVolume != null)
                        {
                            ChangeMovieVolume.Invoke(-100 * (100 - cve.Volume));
                        }
                    }
                    else if (cve.Channel > 0 && cve.Channel <= 10)
                    {
                        volumePercents[cve.Channel - 1] = cve.Volume;
                    }
                    break;

                case EventType.RapidChangeBPM:
                    var rcbe = evddata as RapidChangeBPMEvent;
                    if (rcbe.Rapid)
                    {
                        BPMManager.CurrentBPM = rcbe.BPM;
                    }
                    BPMManager.TargetBPM = rcbe.BPM;
                    break;

                case EventType.ChangeReleaseSound:
                    var crse = evddata as ChangeReleaseSoundEvent;
                    releaseSounds[crse.Channel - 1] = crse.ReleaseSound;
                    break;
                }
                iter++;
                if (iter >= data.Length)
                {
                    return;
                }
                evddata = data[iter];
            }
        }
Exemple #2
0
 public void retry()
 {
     iter = 0;
     if (ChangeMovieVolume != null)
     {
         ChangeMovieVolume.Invoke(-1000);
     }
     for (int i = 0; i < volumePercents.Length; i++)
     {
         volumePercents[i] = 90;
         keepPlaying[i]    = false;
         releaseSounds[i]  = false;
     }
     currentbpm = defaultbpm;
     targetbpm  = defaultbpm;
 }
Exemple #3
0
        public void Retry()
        {
            iter = 0;
            if (ChangeMovieVolume != null)
            {
                ChangeMovieVolume.Invoke(-1000);
            }
            for (int i = 0; i < volumePercents.Length; i++)
            {
                volumePercents[i] = 90;
                keepPlayings[i]   = false;
                releaseSounds[i]  = false;
            }

            BPMManager.CurrentBPM = defaultbpm;
            BPMManager.TargetBPM  = defaultbpm;
        }