Beispiel #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            Component = reader.ReadItem() as BeaconItem;

            if (Component != null)
            {
                Component.Beacon = this;
            }

            int count = reader.ReadInt();

            for (int i = 0; i < count; i++)
            {
                Item item = reader.ReadItem();
                if (item != null)
                {
                    if (Rubble == null)
                    {
                        Rubble = new List <Item>();
                    }

                    Rubble.Add(item);
                }
            }
        }
Beispiel #2
0
        private void AddRubble(Item i, Point3D p)
        {
            i.MoveToWorld(p, this.Map);

            if (Rubble == null)
            {
                Rubble = new List <Item>();
            }

            Rubble.Add(i);
        }