Files
SahikandClaude Opus 5.5 ddd5fdc28b Rebuild the game as a single code-driven scene with a package-folder pack source
- One empty scene; App builds the canvas, safe-area layout and a shared 5x6
  Grid in code. Pages (Intro, Main, Choose, Play, Account, Settings) replace
  5 scenes, 5 prefabs and the per-cell spawner/display components.
- Packs: the game reads Rhyculator/package/ (with All files access) or the
  app folder, like a plugged-in USB stick. Zips stay where they are and are
  extracted to a cache keyed by name/size/mtime; folders are read directly.
  Scans run every second on a background thread. Old songs/ imports and inbox
  zips are migrated automatically.
- Download packs by 8-char code from the new pack website, or via
  rhyculator://pack/<code> links; opened/shared zips go into the package folder.
- Play: pause/resume/retry, auto-pause on background, combo and progress bar;
  judging and scoring unchanged. Choose page fits 9:16 screens; empty state,
  pack delete. Android back key handled everywhere.
- Slimming: removed TextMesh Pro, unused 2D/Timeline/VisualScripting/etc.
  packages and modules, scene template, unused sprites; menu theme wav (20MB)
  -> ogg (2.3MB). Build profile replaced by explicit settings in BuildAndroid.
- Tests: PackLibrary/PackReader/migration/serializer tests (39 passing).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:18:54 +08:00

31 lines
884 B
C#

// 一次遊玩的統計,給結算/上傳使用
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}";
}