blob: 2f7caa9fae815812e94051eb521ef93b9648f560 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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>();
}
}
|