public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
            {
                return(false);
            }

            if (!base.LoadFromDesc(desc))
            {
                return(false);
            }

            MyRBTriangleMeshElementDesc tmDesc = (MyRBTriangleMeshElementDesc)desc;

            SetModel(tmDesc.Model);
            if (tmDesc.ModelLOD0 == null)
            {
                SetModelLOD0(tmDesc.Model);
            }
            else
            {
                SetModelLOD0(tmDesc.ModelLOD0);
            }
            return(true);
        }
Esempio n. 2
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if(!desc.IsValid())
                return false;

            if(!base.LoadFromDesc(desc))
                return false;

            SetRadius(((MyRBSphereElementDesc) desc).m_Radius);
            return true;
        }
Esempio n. 3
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            CollisionLayer = ((MyRBElementDesc)desc).m_CollisionLayer;

            LocalTransformation = ((MyRBElementDesc)desc).m_Matrix;
            RBElementMaterial = ((MyRBElementDesc)desc).m_RBMaterial;

            return true;
        }
Esempio n. 4
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            CollisionLayer = ((MyRBElementDesc)desc).m_CollisionLayer;

            LocalTransformation = ((MyRBElementDesc)desc).m_Matrix;
            RBElementMaterial   = ((MyRBElementDesc)desc).m_RBMaterial;

            return(true);
        }
Esempio n. 5
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
                return false;

            if (!base.LoadFromDesc(desc))
                return false;

            SetSize(((MyRBBoxElementDesc)desc).m_Size);
            return true;
        }
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            MyBoxSensorElementDesc se = (MyBoxSensorElementDesc)desc;

            m_Matrix = se.m_Matrix;

            SetSize(se.Size);

            return true;
        }
Esempio n. 7
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            MySphereSensorElementDesc se = (MySphereSensorElementDesc)desc;

            m_Matrix = se.m_Matrix;

            SetRadius(se.m_Radius);

            return(true);
        }
Esempio n. 8
0
        public virtual bool LoadFromDesc(MyElementDesc desc)
        {
            m_Guid = GUID_COUNTER;

            if (GUID_COUNTER > 65000)
            {
                GUID_COUNTER = 0;
            }
            GUID_COUNTER++;

            return true;
        }
Esempio n. 9
0
        public virtual bool LoadFromDesc(MyElementDesc desc)
        {
            m_Guid = GUID_COUNTER;

            if (GUID_COUNTER > 65000)
            {
                GUID_COUNTER = 0;
            }
            GUID_COUNTER++;

            return(true);
        }
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            MySphereSensorElementDesc se = (MySphereSensorElementDesc) desc;

            m_Matrix = se.m_Matrix;

            SetRadius(se.m_Radius);

            return true;
        }
Esempio n. 11
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            base.LoadFromDesc(desc);

            MyBoxSensorElementDesc se = (MyBoxSensorElementDesc)desc;

            m_Matrix = se.m_Matrix;

            SetSize(se.Size);

            return(true);
        }
Esempio n. 12
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
                return false;

            if (!base.LoadFromDesc(desc))
                return false;

            MyRBVoxelElementDesc vd = (MyRBVoxelElementDesc) desc;

            Size = vd.m_Size;

            return true;
        }
Esempio n. 13
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
            {
                return(false);
            }

            if (!base.LoadFromDesc(desc))
            {
                return(false);
            }

            SetRadius(((MyRBSphereElementDesc)desc).m_Radius);
            return(true);
        }
Esempio n. 14
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
            {
                return(false);
            }

            if (!base.LoadFromDesc(desc))
            {
                return(false);
            }

            SetSize(((MyRBBoxElementDesc)desc).m_Size);
            return(true);
        }
Esempio n. 15
0
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
            {
                return(false);
            }

            if (!base.LoadFromDesc(desc))
            {
                return(false);
            }

            MyRBVoxelElementDesc vd = (MyRBVoxelElementDesc)desc;

            Size = vd.m_Size;

            return(true);
        }
        public override bool LoadFromDesc(MyElementDesc desc)
        {
            if (!desc.IsValid())
                return false;

            if (!base.LoadFromDesc(desc))
                return false;

            MyRBTriangleMeshElementDesc tmDesc = (MyRBTriangleMeshElementDesc)desc;

            SetModel(tmDesc.Model);
            if (tmDesc.ModelLOD0 == null)
                SetModelLOD0(tmDesc.Model);
            else
                SetModelLOD0(tmDesc.ModelLOD0);
            return true;
        }