Exemplo n.º 1
0
 public virtual void Init(StringBuilder hudLabelText, Matrix localMatrix, Vector3 offset, float rotateSpeed, MyCrusherDrill parentObject, MyModelsEnum model)
 {
     base.Init(hudLabelText, model, null, parentObject, null, null);
     m_rotateSpeed = rotateSpeed;
     this.LocalMatrix = Matrix.CreateTranslation(offset) * localMatrix;
     Save = false;
 }
Exemplo n.º 2
0
            /// <summary>
            /// Returns new instance of weapon
            /// </summary>
            /// <param name="weaponType">Weapon type</param>
            /// <returns></returns>
            public static MySmallShipGunBase GenerateWeapon(MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum weaponType)
            {
                MySmallShipGunBase newGun;

                switch (weaponType)
                {
                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Autocanon:
                    newGun = new MyAutocanonGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Automatic_Rifle_With_Silencer:
                    newGun = new MyAutomaticRifleSilencerGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Crusher:
                    newGun = new MyCrusherDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Laser:
                    newGun = new MyLaserDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Nuclear:
                    newGun = new MyNuclearDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Saw:
                    newGun = new MySawDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Thermal:
                    newGun = new MyThermalDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Drilling_Device_Pressure:
                    newGun = new MyPressureDrill();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Missile_Launcher:
                    newGun = new MyMissileLauncherGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Harvesting_Device:
                    newGun = new MyHarvestingDevice();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Machine_Gun:
                    newGun = new MyMachineGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Cannon:
                    newGun = new MyCannonGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Shotgun:
                    newGun = new MyShotGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Sniper:
                    newGun = new MySniperGun();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Universal_Launcher_Back:
                    newGun = new MyUniversalLauncher();
                    break;

                case MyMwcObjectBuilder_SmallShip_Weapon_TypesEnum.Universal_Launcher_Front:
                    newGun = new MyUniversalLauncher();
                    break;

                default:
                    throw new MyMwcExceptionApplicationShouldNotGetHere();
                    break;
                }
                return(newGun);
            }
Exemplo n.º 3
0
 public virtual void Init(StringBuilder hudLabelText, Matrix localMatrix, Vector3 offset, float rotateSpeed, MyCrusherDrill parentObject, MyModelsEnum model)
 {
     base.Init(hudLabelText, model, null, parentObject, null, null);
     m_rotateSpeed    = rotateSpeed;
     this.LocalMatrix = Matrix.CreateTranslation(offset) * localMatrix;
     Save             = false;
 }