public Rectangle DeserializeRectangle(IDeserializer deserializer, string serName) { IDeserializer subDeser = deserializer.SubDeserializer(serName); return new Rectangle(subDeser.DeserializeInteger(tagLeft), subDeser.DeserializeInteger(tagTop), subDeser.DeserializeInteger(tagWidth), subDeser.DeserializeInteger(tagHeight)); }
public Vector2 DeserializeVector2(IDeserializer deserializer, string serName) { IDeserializer subDeser = deserializer.SubDeserializer(serName); return new Vector2((float) subDeser.DeserializeDouble(tagX), (float) subDeser.DeserializeDouble(tagY)); }
public void Deserialize(IDeserializer deserializer) { Name = deserializer.DeserializeString("Name"); // Zombie var zombieDesers = deserializer.DeserializeAll("Zombie"); foreach (var zombieDer in zombieDesers) { Zombies.Add(zombieDer.DeserializeString("Value")); } // Number var numberDer = deserializer.SubDeserializer("Number"); NumberFrom = numberDer.DeserializeInteger("From"); NumberTo = numberDer.DeserializeInteger("To"); _timeNextWave = deserializer.DeserializeDouble("TimeNextWave"); _timeBeginWave = deserializer.DeserializeDouble("TimeBeginWave"); _timeNextZombieFrom = deserializer.DeserializeDouble("TimeNextZombieFrom"); _timeNextZombieTo = deserializer.DeserializeDouble("TimeNextZombieTo"); }