Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadEncodedInt();

            MCT = new MiniCarouselTimer(this);
            if (Dolls == null)
            {
                Dolls = new List <CarouselDoll>();
            }
            if (Lights == null)
            {
                Lights = new List <CarouselDoll>();
            }
            int counter = reader.ReadInt();

            for (int i = 0; i < counter; i++)
            {
                CarouselDoll doll = (CarouselDoll)reader.ReadItem();
                Dolls.Add(doll);
            }
            counter = reader.ReadInt();
            for (int i = 0; i < counter; i++)
            {
                CarouselDoll light = (CarouselDoll)reader.ReadItem();
                Lights.Add(light);
            }
        }
Пример #2
0
 public MiniCarouselSwitchComponent(int itemID) : base(itemID)
 {
     Name = "MiniCarousel Switch";
     Hue  = 0x58;
     MCT  = new MiniCarouselTimer(this);
     if (Dolls == null)
     {
         Dolls = new List <CarouselDoll>();
     }
     if (Lights == null)
     {
         Lights = new List <CarouselDoll>();
     }
     AddDolls();
 }