Exemple #1
0
        public override void Delete()
        {
            if (OnGoing)
            {
                EndInvasion();
            }

            if (Region != null)
            {
                Region.Unregister();
                Region = null;
            }

            if (Timer != null)
            {
                Timer.Stop();
                Timer = null;
            }

            foreach (var wp in WaypointsA.Where(w => w != null && !w.Deleted))
            {
                wp.Delete();
            }

            foreach (var wp in WaypointsB.Where(w => w != null && !w.Deleted))
            {
                wp.Delete();
            }

            base.Delete();
        }
Exemple #2
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)2);

            if (Level3Spawner != null)
            {
                writer.Write(0);
                Level3Spawner.Serialize(writer);
            }
            else
            {
                writer.Write(1);
            }

            writer.Write(RespawnMin);
            writer.Write(RespawnMax);

            writer.Write(_Active);
            writer.Write(WaypointsA.Count);
            writer.Write(WaypointsB.Count);

            WaypointsA.ForEach(w => writer.Write(w));
            WaypointsB.ForEach(w => writer.Write(w));
        }
Exemple #3
0
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0);

            writer.Write(RespawnMin);
            writer.Write(RespawnMax);

            writer.Write(_Active);
            writer.Write(WaypointsA.Count);
            writer.Write(WaypointsB.Count);

            WaypointsA.ForEach(w => writer.Write(w));
            WaypointsB.ForEach(w => writer.Write(w));
        }