public void Serialize(DataSerializer s) { EnhancedForestFire d = Singleton <EnhancedDisastersManager> .instance.container.ForestFire; serializeCommonParameters(s, d); s.WriteInt32(d.WarmupDays); s.WriteFloat(d.noRainDays); }
public override void CopySettings(EnhancedDisaster disaster) { base.CopySettings(disaster); EnhancedForestFire d = disaster as EnhancedForestFire; if (d != null) { WarmupDays = d.WarmupDays; } }
public void Deserialize(DataSerializer s) { EnhancedForestFire d = Singleton <EnhancedDisastersManager> .instance.container.ForestFire; deserializeCommonParameters(s, d); d.WarmupDays = s.ReadInt32(); if (s.version <= 2) { float daysPerFrame = Helper.DaysPerFrame; d.noRainDays = s.ReadInt32() * daysPerFrame; } else { d.noRainDays = s.ReadFloat(); } }
public void CheckObjects() { if (ForestFire == null) { ForestFire = new EnhancedForestFire(); } if (Thunderstorm == null) { Thunderstorm = new EnhancedThunderstorm(); } if (Sinkhole == null) { Sinkhole = new EnhancedSinkhole(); } if (Tsunami == null) { Tsunami = new EnhancedTsunami(); } if (Tornado == null) { Tornado = new EnhancedTornado(); } if (Earthquake == null) { Earthquake = new EnhancedEarthquake(); } if (MeteorStrike == null) { MeteorStrike = new EnhancedMeteorStrike(); } AllDisasters.Clear(); AllDisasters.Add(ForestFire); AllDisasters.Add(Thunderstorm); AllDisasters.Add(Sinkhole); AllDisasters.Add(Tsunami); AllDisasters.Add(Tornado); AllDisasters.Add(Earthquake); AllDisasters.Add(MeteorStrike); }