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

            switch (version)
            {
            case 1:
            {
                InactiveMessage = reader.ReadInt();
                ActiveMessage   = reader.ReadInt();
                goto case 0;
            }

            case 0:
            {
                Offset       = reader.ReadPoint3D();
                Addon        = reader.ReadItem() as CraftAddon;
                _LabelNumber = reader.ReadInt();
                ActiveID     = reader.ReadInt();
                InactiveID   = reader.ReadInt();
                TurnedOn     = reader.ReadBool();
                break;
            }
            }

            if (Addon != null)
            {
                Addon.OnCraftComponentLoaded(this);
            }
        }
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            Offset       = reader.ReadPoint3D();
            Addon        = reader.ReadItem() as CraftAddon;
            _LabelNumber = reader.ReadInt();
            ActiveID     = reader.ReadInt();
            InactiveID   = reader.ReadInt();
            TurnedOn     = reader.ReadBool();

            if (Addon != null)
            {
                Addon.OnCraftComponentLoaded(this);
            }
        }