public Profile() { JudgementCounts = new long[(int)BeatlineNoteJudgement.Count + 2]; LastPlayerOptions = new PlayerOptions { BeatlineSpeed = 1.0, ScrollDirectionEast = true }; }
public Profile(SerializationInfo si, StreamingContext sc) { LastPlayerOptions = new PlayerOptions(); Name = (string)si.GetValue("Name", typeof(string)); EXP = (long)si.GetValue("EXP", typeof(long)); JudgementCounts = (long[])si.GetValue("JudgementCounts", typeof(long[])); TotalHits = (long)si.GetValue("TotalHits", typeof(long)); LastPlayerOptions.PlayDifficulty = (Difficulty)si.GetValue("LastDifficulty", typeof(Difficulty)); LastPlayerOptions.BeatlineSpeed = (double)si.GetValue("LastBeatlineSpeed", typeof(double)); SongsCleared = (long)si.GetValue("SongsCleared", typeof(long)); SongsFailed = (long)si.GetValue("SongsFailed", typeof(long)); TotalPlayTime = (double)si.GetValue("TotalPlayTime", typeof(double)); AverageHitOffset = si.GetDouble("AverageHitOffset"); HitOffsetCount = si.GetInt64("HitOffsetCount"); LastPlayerOptions.DisableKO = si.GetBoolean("DisableKO"); try { LastPlayerOptions.ScrollDirectionEast = si.GetBoolean("ScrollDirectionEast"); LastPlayerOptions.ScrollDirectionWest = si.GetBoolean("ScrollDirectionWest"); LastPlayerOptions.DisableExtraLife = si.GetBoolean("DisableExtraLife"); MostHitsEver = si.GetInt32("MostHitsEver"); MostStreakEver = si.GetInt32("MostStreakEver"); ProfileOutOfDate = false; } catch (SerializationException) { ProfileOutOfDate = true; } }
public Player() { Judgements = new int[8]; PlayerOptions = new PlayerOptions(); ApplyDefaultOptions(); }