public void Deserialize(DataSerializer s)
            {
                EnhancedTsunami d = Singleton <EnhancedDisastersManager> .instance.container.Tsunami;

                deserializeCommonParameters(s, d);

                d.WarmupYears = s.ReadFloat();
            }
            public void Serialize(DataSerializer s)
            {
                EnhancedTsunami d = Singleton <EnhancedDisastersManager> .instance.container.Tsunami;

                serializeCommonParameters(s, d);

                s.WriteFloat(d.WarmupYears);
            }
        public override void CopySettings(EnhancedDisaster disaster)
        {
            base.CopySettings(disaster);

            EnhancedTsunami d = disaster as EnhancedTsunami;

            if (d != null)
            {
                WarmupYears = d.WarmupYears;
            }
        }
Exemplo n.º 4
0
        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);
        }