diff options
| author | chai <215380520@qq.com> | 2023-11-02 11:51:31 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2023-11-02 11:51:31 +0800 |
| commit | 7f493f682503f5186308de7b8f74b5b49233cfe4 (patch) | |
| tree | 8a91e2056bc79788ee4735dce88b8d516ba12beb /GameCode/LevelData.cs | |
+init
Diffstat (limited to 'GameCode/LevelData.cs')
| -rw-r--r-- | GameCode/LevelData.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/GameCode/LevelData.cs b/GameCode/LevelData.cs new file mode 100644 index 0000000..2f7caa9 --- /dev/null +++ b/GameCode/LevelData.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; + +[Serializable] +public class LevelData +{ + public int questsCompleteWhenLastVisitingMap; + + public bool beaten; + + public int highscore; + + public List<int> dayToDayScore = new List<int>(); + + public List<int> dayToDayNetworth = new List<int>(); + + public bool beatenBest; + + public int highscoreBest; + + public List<int> dayToDayScoreBest = new List<int>(); + + public List<int> dayToDayNetworthBest = new List<int>(); + + public List<List<Equippable>> levelHasBeenBeatenWith = new List<List<Equippable>>(); + + public void SaveScoreAndStatsToBestIfBest(bool _endOfMatch) + { + beatenBest = beaten || beatenBest; + if (highscore > highscoreBest) + { + highscoreBest = highscore; + dayToDayScoreBest = new List<int>(dayToDayScore); + dayToDayNetworthBest = new List<int>(dayToDayNetworth); + } + if (_endOfMatch && beaten) + { + levelHasBeenBeatenWith.Add(new List<Equippable>(PerkManager.instance.CurrentlyEquipped)); + } + beaten = false; + highscore = 0; + dayToDayScore = new List<int>(); + dayToDayScore.Add(0); + dayToDayNetworth = new List<int>(); + } +} |
