public WindowRankingComparison(Game_Ranking ranking, Game_Ranking previousRanking) { Ranking = ranking; PreviousRanking = previousRanking; InitializeImages(); }
public static Save_Data read(BinaryReader reader) { Save_Data result = new Save_Data(); if (!Global.LOADED_VERSION.older_than(0, 4, 3, 0)) { result.Time = DateTime.FromBinary(reader.ReadInt64()); } result.Chapter_Id = reader.ReadString(); result.Progression_Id = reader.ReadString(); result.System = new Game_System(); result.System.read(reader); if (Global.LOADED_VERSION.older_than(0, 4, 0, 4)) { List <string> previous_chapters = Global.data_chapters[result.Chapter_Id].Prior_Chapters; result.System.previous_chapters.AddRange(previous_chapters); } result.Battalions = new Game_Battalions(); result.Battalions.read(reader); if (Global.LOADED_VERSION.older_than(0, 5, 3, 1)) { if (Global.data_chapters.ContainsKey(result.Chapter_Id)) { // Correct battalion id result.Battalions.correct_battalion_id( Global.data_chapters[result.Chapter_Id]); } } result.Actors = new Game_Actors(); result.Actors.read(reader); result.Switches = Event_Variable_Data <bool> .read(reader); //result.Switches = new bool[Config.EVENT_DATA_LENGTH]; //Debug //result.Switches = result.Switches.read(reader); result.Variables = Event_Variable_Data <int> .read(reader); //result.Variables = new int[Config.EVENT_DATA_LENGTH]; //result.Variables = result.Variables.read(reader); result.Ranking = Game_Ranking.read(reader); if (!Global.LOADED_VERSION.older_than(0, 4, 4, 0)) { result.Past_Rankings = PastRankings.read(reader, result.System.Difficulty_Mode); } else { result.Past_Rankings = new PastRankings(); } // If this save predates storing difficulty in the ranking object if (Global.LOADED_VERSION.older_than(0, 6, 1, 1)) { Difficulty_Modes difficulty = result.System.Difficulty_Mode; result.Ranking = new Game_Ranking(result.Ranking, difficulty); } return(result); }
public void save_data(string chapter_id, string progression_id, PastRankings past_rankings) { Time = DateTime.Now; Chapter_Id = chapter_id; Progression_Id = progression_id; System = Global.game_system.copy(); Battalions = Global.game_battalions; Actors = Global.game_actors; Switches = new Event_Variable_Data <bool>(Config.EVENT_DATA_LENGTH); Variables = new Event_Variable_Data <int>(Config.EVENT_DATA_LENGTH); System.get_event_data(Switches, Variables); //Event_Processor.get_data(Switches, Variables); //Debug Ranking = new Game_Ranking(); Past_Rankings = (PastRankings)past_rankings.Clone(); }
internal RankingUINode( string helpLabel, TextSprite text, int width, Game_Ranking ranking) : base(helpLabel, text, width) { RankValue = new RightAdjustedText(); RankValue.SetFont(Tactile.Config.UI_FONT, Global.Content, "Blue"); RankValue.text = ranking.score.ToString(); RankValue.draw_offset = new Vector2(56 - 0, 0); Rank = ranking_text(ranking.rank); Rank.SetFont(Tactile.Config.UI_FONT + "L", Tactile.Config.UI_FONT); Rank.draw_offset = new Vector2(56 + 4, 0); }
public WindowRankingComparison(Game_Ranking ranking) { Ranking = ranking; InitializeImages(); }