예제 #1
0
        public static void ResetToTime(float time, float nextStart, int soundStream, CVideoStream vidStream)
        {
            if (time < 0)
            {
                time = 0;
            }

            CurrentBeatF = GetBeatFromTime(time, GetSong().BPM, GetSong().Gap);

            for (int p = 0; p < _NumPlayers; p++)
            {
                Players[p].Points            = 0;
                Players[p].PointsGoldenNotes = 0;
                Players[p].PointsLineBonus   = 0;
                int l          = 0;
                int deleteLine = 0;
                foreach (CSungLine line in Players[p].SungLines)
                {
                    int n          = -1;
                    int deleteNote = 0;
                    Players[p].PointsLineBonus += line.BonusPoints;
                    foreach (CSungNote note in line.Notes)
                    {
                        if (note.StartBeat < nextStart)
                        {
                            if (note.Hit && note.HitNote.Type == ENoteType.Golden)
                            {
                                Players[p].PointsGoldenNotes += note.Points;
                            }
                            Players[p].Points += note.Points;
                        }
                        else if (deleteNote != -1)
                        {
                            deleteNote = n;
                        }
                        n++;
                    }
                    while (line.NoteCount > n && n >= 0)
                    {
                        if (line.Notes[n].Hit && line.Notes[n].HitNote.Type == ENoteType.Golden)
                        {
                            Players[p].PointsGoldenNotes -= line.Notes[n].Points;
                        }
                        Players[p].Points -= line.Notes[n].Points;
                        line.DeleteNote(n);
                    }

                    if (line.LastNoteBeat > CurrentBeat && deleteLine == 0)
                    {
                        deleteLine = l;
                    }
                    l++;
                }
                Players[p].SungLines.RemoveRange(deleteLine, Players[p].SungLines.Count - deleteLine);
            }

            CSound.SetPosition(soundStream, time);
            CVideo.Skip(vidStream, time, GetSong().VideoGap);
        }
예제 #2
0
파일: CMain.cs 프로젝트: da-ka/Vocaluxe
 public bool Skip(CVideoStream stream, float startPosition, float videoGap)
 {
     return(CVideo.Skip(stream, startPosition, videoGap));
 }