Ejemplo n.º 1
0
        public override void Init(StringBuilder hudLabelText, MyModelsEnum? modelEnum, MyMaterialType materialType,
            MyEntity parentObject, Vector3 position, Vector3 forwardVector, Vector3 upVector,
            MyMwcObjectBuilder_Base objectBuilder, MyModelsEnum? collisionModel = null)
        {
            base.Init(null, modelEnum, materialType, parentObject, position, forwardVector, upVector, null, collisionModel);
            //InitSpherePhysics(MyMaterialType.METAL, ModelLod0, 9999999.0f, 1.0f, MyConstants.COLLISION_LAYER_ALL, RigidBodyFlag.RBF_RBO_STATIC);
            //if (this.Physics != null)
            //{
            //    this.Physics.Enabled = true;
            //    this.Physics.Update();
            //}

            InitTrianglePhysics(materialType, 9999999.0f, ModelCollision, null);

            m_checkTargetInterval_ms = MyMinerGame.TotalGamePlayTimeInMilliseconds;
            m_predictionInterval_ms = MyMinerGame.TotalGamePlayTimeInMilliseconds;
            m_rotationInterval_ms = MyMinerGame.TotalGamePlayTimeInMilliseconds;
            m_elevationInterval_ms = MyMinerGame.TotalGamePlayTimeInMilliseconds;

            m_prediction = new MyLargeShipWeaponPrediction();

            InitializationMatrix = LocalMatrix;
            InitializationBarrelMatrix = Matrix.Identity;
        }
Ejemplo n.º 2
0
        public MyLargeShipGunBase()
            :base()
        {
            m_status = MyLargeShipGunStatus.MyWeaponStatus_Deactivated;
            m_predictionInterval_ms = 0;
            m_predictionIntervalConst_ms = 250;
            m_checkTargetInterval_ms = 0;
            m_checkTargetIntervalConst_ms = 150;
            m_randomStandbyChange_ms = MyMinerGame.TotalGamePlayTimeInMilliseconds;
            m_randomStandbyChangeConst_ms = 4000;
            m_randomStandbyRotation = 0.0f;
            m_randomStandbyElevation = 0.0f;
            m_rotation = 0.0f;
            m_elevation = 0.0f;
            m_rotationSpeed = MyLargeShipWeaponsConstants.ROTATION_SPEED;
            m_elevationSpeed = MyLargeShipWeaponsConstants.ELEVATION_SPEED;
            m_rotationInterval_ms = 0;
            m_elevationInterval_ms = 0;
            m_predictedTarget = Vector3.Zero;
            m_prediction = null;
            m_shootDelayIntervalConst_ms = 200;
            m_shootIntervalConst_ms = 1200;
            m_shootIntervalVarianceConst_ms = 500;
            m_shootStatusChanged_ms = 0;
            m_onlyPotentialTargetDetected = false;

            //NeedsUpdate = true;
        }