Ejemplo n.º 1
0
            public void Serialize(DataSerializer s)
            {
                EnhancedSinkhole d = Singleton <EnhancedDisastersManager> .instance.container.Sinkhole;

                serializeCommonParameters(s, d);
                s.WriteFloat(d.GroundwaterCapacity);
                s.WriteFloat(d.groundwaterAmount);
            }
Ejemplo n.º 2
0
            public void Deserialize(DataSerializer s)
            {
                EnhancedSinkhole d = Singleton <EnhancedDisastersManager> .instance.container.Sinkhole;

                deserializeCommonParameters(s, d);
                d.GroundwaterCapacity = s.ReadFloat();
                d.groundwaterAmount   = s.ReadFloat();
            }
Ejemplo n.º 3
0
        public override void CopySettings(EnhancedDisaster disaster)
        {
            base.CopySettings(disaster);

            EnhancedSinkhole d = disaster as EnhancedSinkhole;

            if (d != null)
            {
                GroundwaterCapacity = d.GroundwaterCapacity;
            }
        }
Ejemplo 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);
        }