Ejemplo n.º 1
0
        public bool IsPerfect(CNote CompareNote)
        {
            bool Result = true;

            if (!Hit)
            {
                Result = false;
            }

            if (StartBeat != CompareNote.StartBeat)
            {
                Result = false;
            }

            if (EndBeat != CompareNote.EndBeat)
            {
                Result = false;
            }

            if (Tone != CompareNote.Tone)
            {
                Result = false;
            }

            Perfect = Result;
            return(Result);
        }
Ejemplo n.º 2
0
 public bool InsertNote(CNote Note, int Index)
 {
     if (_Notes.Count >= Index)
     {
         _Notes.Insert(Index, Note);
         updateMinMaxBeat(Note);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public CNote(CNote note)
 {
     _StartBeat = note._StartBeat;
     _Duration  = note._Duration;
     _Tone      = note._Tone;
     _NoteType  = note._NoteType;
     _Text      = note._Text;
     _Hit       = note._Hit;
     _Perfect   = note._Perfect;
 }
Ejemplo n.º 4
0
 public bool InsertNote(CNote Note, int LineIndex, int NoteIndex)
 {
     if (_Lines.Count > LineIndex)
     {
         bool res = _Lines[LineIndex].InsertNote(Note, NoteIndex);
         UpdateTimings();
         return(res);
     }
     return(false);
 }
Ejemplo n.º 5
0
 public bool ReplaceNote(int Index, CNote Note)
 {
     if (_Notes.Count > Index)
     {
         _Notes.RemoveAt(Index);
         _Notes.Insert(Index, Note);
         updateMinMaxBeat();
         return(true);
     }
     return(false);
 }
Ejemplo n.º 6
0
        private void updateMinMaxBeat(CNote Note)
        {
            if (Note.StartBeat < _MinBeat)
            {
                _MinBeat = Note.StartBeat;
            }

            if (Note.EndBeat > _MaxBeat)
            {
                _MaxBeat = Note.EndBeat;
            }
        }
Ejemplo n.º 7
0
 public bool AddNote(CNote Note, int LineIndex, bool updateTimings)
 {
     if (_Lines.Count > LineIndex)
     {
         _Lines[LineIndex].AddNote(Note);
         if (updateTimings)
         {
             UpdateTimings();
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 8
0
        private void ParseNote(int Player, ENoteType NoteType, int Start, int Length, int Tone, string Text)
        {
            CNote  note  = new CNote(Start, Length, Tone, Text, NoteType);
            CLines lines = this.Notes.GetLines(Player);

            if (lines.LineCount == 0)
            {
                CLine line = new CLine();
                line.AddNote(note);
                lines.AddLine(line, false);
            }
            else
            {
                lines.AddNote(note, lines.LineCount - 1, false);
            }
        }
Ejemplo n.º 9
0
 public bool AddNote(CNote Note, int LineIndex, bool updateTimings)
 {
     if (_Lines.Count > LineIndex)
     {
         _Lines[LineIndex].AddNote(Note);
         if (updateTimings)
         {
             UpdateTimings();
         }
         return true;
     }
     return false;
 }
Ejemplo n.º 10
0
        private void ParseNote(int Player, ENoteType NoteType, int Start, int Length, int Tone, string Text)
        {
            CNote note = new CNote(Start, Length, Tone, Text, NoteType);
            CLines lines = this.Notes.GetLines(Player);

            if (lines.LineCount == 0)
            {
                CLine line = new CLine();
                line.AddNote(note);
                lines.AddLine(line);
            }
            else
            {
                lines.AddNote(note, lines.LineCount - 1);
            }
        }
Ejemplo n.º 11
0
 public bool AddNote(CNote Note, int LineIndex)
 {
     return(AddNote(Note, LineIndex, true));
 }
Ejemplo n.º 12
0
 public CNote(CNote note)
 {
     _StartBeat = note._StartBeat;
     _Duration = note._Duration;
     _Tone = note._Tone;
     _NoteType = note._NoteType;
     _Text = note._Text;
     _Hit = note._Hit;
     _Perfect = note._Perfect;
 }
Ejemplo n.º 13
0
 public virtual void AddNote(int ID, CNote Note)
 {
 }
Ejemplo n.º 14
0
 public void AddNote(CNote Note)
 {
     _Notes.Add(Note);
     updateMinMaxBeat(Note);
 }
Ejemplo n.º 15
0
        public bool IsPerfect(CNote CompareNote)
        {
            bool Result = true;

            if (!Hit)
                Result = false;

            if (StartBeat != CompareNote.StartBeat)
                Result = false;

            if (EndBeat != CompareNote.EndBeat)
                Result = false;

            if (Tone != CompareNote.Tone)
                Result = false;

            Perfect = Result;
            return Result;
        }
Ejemplo n.º 16
0
 public bool InsertNote(CNote Note, int LineIndex, int NoteIndex)
 {
     if (_Lines.Count > LineIndex)
     {
         bool res = _Lines[LineIndex].InsertNote(Note, NoteIndex);
         UpdateTimings();
         return res;
     }
     return false;
 }
Ejemplo n.º 17
0
 public void AddNote(CNote Note)
 {
     _Notes.Add(Note);
     updateMinMaxBeat(Note);
 }
Ejemplo n.º 18
0
 public bool AddNote(CNote Note, int LineIndex)
 {
     return AddNote(Note, LineIndex, true);
 }
Ejemplo n.º 19
0
 public void AddNote(CNote Note)
 {
     _Notes.Add(Note);
 }
Ejemplo n.º 20
0
        private void updateMinMaxBeat(CNote Note)
        {
            if (Note.StartBeat < _MinBeat)
            {
                _MinBeat = Note.StartBeat;
            }

            if (Note.EndBeat > _MaxBeat)
            {
                _MaxBeat = Note.EndBeat;
            }
        }
Ejemplo n.º 21
0
 public bool ReplaceNote(int Index, CNote Note)
 {
     if (_Notes.Count > Index)
     {
         _Notes.RemoveAt(Index);
         _Notes.Insert(Index, Note);
         updateMinMaxBeat();
         return true;
     }
     return false;
 }
Ejemplo n.º 22
0
 public bool InsertNote(CNote Note, int Index)
 {
     if (_Notes.Count >= Index)
     {
         _Notes.Insert(Index, Note);
         updateMinMaxBeat(Note);
         return true;
     }
     return false;
 }