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"); }
public void Deserialize(IDeserializer deserializer) { Name = deserializer.DeserializeString("Name"); var waveDers = deserializer.DeserializeAll("Wave"); foreach (var item in waveDers) { Wave wave = new Wave(); wave.Deserialize(item); Waves.Add(wave); } }