public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            case 0:
            {
                m_Addon  = reader.ReadEntity <BaseAddon>();
                m_Offset = reader.ReadPoint3D();

                m_Addon?.OnComponentLoaded(this);

                ApplyLightTo(this);

                break;
            }
            }

            if (version < 1 && Weight == 0)
            {
                Weight = -1;
            }
        }
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            case 0:
            {
                m_Addon  = reader.ReadItem() as BaseAddon;
                m_Offset = reader.ReadPoint3D();

                if (m_Addon != null)
                {
                    m_Addon.OnComponentLoaded(this);
                }

                ApplyLightTo(this);

                break;
            }
            }

            if (version < 1 && Weight == 0)
            {
                Weight = -1;
            }
        }
Beispiel #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                case 0:
                    {
                        m_Addon = reader.ReadItem() as BaseAddon;
                        m_Offset = reader.ReadPoint3D();

                        if (m_Addon != null)
                            m_Addon.OnComponentLoaded(this);

                        ApplyLightTo(this);

                        break;
                    }
            }

            if (version < 1 && Weight == 0)
                Weight = -1;
        }