示例#1
0
		public Game(Battle battle, Scenario scenario, Lb saved)
		{
			this.Battle = battle;
			this.Scenario = scenario;
			_saved = saved;
			if (_saved.Battle != battle.Id || _saved.Scenario != scenario.Id)
				_saved.Reset(battle, scenario);
		}
示例#2
0
		public static Lb GetLb()
		{
			if (lb == null)
			{
				lb = new Lb();
			}
			return lb;
		}
示例#3
0
		static void ReadXml ()
		{
			if (File.Exists (storeLocation)) {
				var serializer = new XmlSerializer (typeof(Lb));
				using (var stream = new FileStream (storeLocation, FileMode.Open)) {
					lb = (Lb)serializer.Deserialize (stream);
				}
			}
		}
示例#4
0
		public static void SaveLb(Lb saved)
		{ 
			if (saved != null)
				lb = saved;
			WriteXml ();
		}