Save points also to notes.
This commit is contained in:
1 parent
808c52d471
commit
46c12db857
3 files changed
+11
-3
No files matched your search
@@ -290,12 +290,15 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
CSungNote lastNote = Players[p].SungLines[line].LastNote;
|
||||
if (notes[note].StartBeat == beat || lastNote.EndBeat + 1 != beat || lastNote.Tone != tone || !lastNote.Hit)
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note]));
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points));
|
||||
else
|
||||
{
|
||||
Players[p].SungLines[line].IncLastNoteLength();
|
||||
Players[p].SungLines[line].LastNote.Points += points;
|
||||
}
|
||||
}
|
||||
else
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note]));
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points));
|
||||
|
||||
Players[p].SungLines[line].LastNote.CheckPerfect();
|
||||
Players[p].SungLines[line].IsPerfect(lines[line]);
|
||||
@@ -336,6 +339,7 @@ namespace Vocaluxe.Base
|
||||
double points = CSettings.LinebonusScore * factor * 1f / numLinesWithPoints;
|
||||
Players[p].Points += points;
|
||||
Players[p].PointsLineBonus += points;
|
||||
Players[p].SungLines[line].BonusPoints = points;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace VocaluxeLib.Songs
|
||||
{
|
||||
public class CSungLine : CLineBase<CSungNote>
|
||||
{
|
||||
public double BonusPoints;
|
||||
|
||||
// for drawing perfect line effect
|
||||
public bool PerfectLine { get; set; }
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@ namespace VocaluxeLib.Songs
|
||||
/// <param name="duration"></param>
|
||||
/// <param name="tone"></param>
|
||||
/// <param name="hitNote"></param>
|
||||
public CSungNote(int startBeat, int duration, int tone, CSongNote hitNote) : this(startBeat, duration, tone)
|
||||
public CSungNote(int startBeat, int duration, int tone, CSongNote hitNote, double points) : this(startBeat, duration, tone)
|
||||
{
|
||||
HitNote = hitNote;
|
||||
Points = points;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public double Points;
|
||||
// for drawing player notes
|
||||
public bool Hit
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user