Initial import of Rhyculator
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
728bb0c657
315 files changed
+96030
No files matched your search
@@ -0,0 +1,30 @@
|
||||
// 一次遊玩的統計,給結算/上傳使用
|
||||
public class PlayResult
|
||||
{
|
||||
public int score;
|
||||
public int perfect, fast, slow, bad, miss;
|
||||
public int maxCombo;
|
||||
public int combo;
|
||||
|
||||
public static PlayResult Last { get; set; }
|
||||
|
||||
public void Add(Judgement j, int points)
|
||||
{
|
||||
score += points;
|
||||
switch (j)
|
||||
{
|
||||
case Judgement.Perfect: perfect++; break;
|
||||
case Judgement.Fast: fast++; break;
|
||||
case Judgement.Slow: slow++; break;
|
||||
case Judgement.Bad: bad++; break;
|
||||
case Judgement.Miss: miss++; break;
|
||||
}
|
||||
|
||||
if (j == Judgement.Miss) combo = 0;
|
||||
else if (j != Judgement.None) combo++;
|
||||
if (combo > maxCombo) maxCombo = combo;
|
||||
}
|
||||
|
||||
public override string ToString() =>
|
||||
$"score={score} P={perfect} F={fast} S={slow} B={bad} M={miss} maxCombo={maxCombo}";
|
||||
}
|
||||
Reference in new issue
Block a user