public MySmallMissileLauncher()
 {
     m_gunBase                 = new MyGunBase();
     m_soundEmitter            = new MyEntity3DSoundEmitter(this, true);
     m_useConveyorSystem.Value = true;
     SyncType.Append(m_gunBase);
 }
Exemple #2
0
        public MySmallGatlingGun()
        {
#if XB1 // XB1_SYNC_NOREFLECTION
            m_useConveyorSystem = SyncType.CreateAndAddProp <bool>();
#endif // XB1
            CreateTerminalControls();

            m_rotationAngle        = MyUtils.GetRandomRadian();
            m_lastTimeShoot        = MyConstants.FAREST_TIME_IN_PAST;
            m_smokeLastTime        = MyConstants.FAREST_TIME_IN_PAST;
            m_smokesToGenerate     = 0;
            m_cannonMotorEndPlayed = true;
            m_rotationTimeout      = (float)MyGatlingConstants.ROTATION_TIMEOUT + MyUtils.GetRandomFloat(-500, +500);

            m_soundEmitter = new MyEntity3DSoundEmitter(this, true);

#if XB1// XB1_SYNC_NOREFLECTION
            m_gunBase = new MyGunBase(SyncType);
#else // !XB1
            m_gunBase = new MyGunBase();
#endif // !XB1

            NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME | MyEntityUpdateEnum.EACH_10TH_FRAME;
            Render.NeedsDrawFromParent = true;

            Render = new MyRenderComponentSmallGatlingGun();
            AddDebugRenderComponent(new MyDebugRenderComponentSmallGatlingGun(this));

#if !XB1 // !XB1_SYNC_NOREFLECTION
            SyncType.Append(m_gunBase);
#endif // !XB1
        }
 public MyAutomaticRifleGun()
 {
     NeedsUpdate      = MyEntityUpdateEnum.EACH_FRAME;
     Render.NeedsDraw = true;
     m_gunBase        = new MyGunBase();
     m_soundEmitter   = new MyEntity3DSoundEmitter(this);
     (PositionComp as MyPositionComponent).WorldPositionChanged = WorldPositionChanged;
     this.Render = new MyRenderComponentAutomaticRifle();
     SyncType    = SyncHelpers.Compose(this);
     SyncType.Append(m_gunBase);
 }
Exemple #4
0
        public MyAutomaticRifleGun()
        {
            NeedsUpdate      = MyEntityUpdateEnum.EACH_FRAME;
            Render.NeedsDraw = true;
#if XB1 // XB1_SYNC_NOREFLECTION
            SyncType  = new SyncType(new List <SyncBase>());
            m_gunBase = new MyGunBase(SyncType);
#else // !XB1
            m_gunBase = new MyGunBase();
#endif // !XB1
            m_soundEmitter = new MyEntity3DSoundEmitter(this);
            (PositionComp as MyPositionComponent).WorldPositionChanged = WorldPositionChanged;
            this.Render = new MyRenderComponentAutomaticRifle();
#if !XB1 // !XB1_SYNC_NOREFLECTION
            SyncType = SyncHelpers.Compose(this);
            SyncType.Append(m_gunBase);
#endif // !XB1
        }
        public MySmallMissileLauncher()
        {
#if XB1 // XB1_SYNC_NOREFLECTION
            m_useConveyorSystem = SyncType.CreateAndAddProp <bool>();
#endif // XB1
            CreateTerminalControls();

#if XB1 // XB1_SYNC_NOREFLECTION
            m_gunBase = new MyGunBase(SyncType);
#else // !XB1
            m_gunBase = new MyGunBase();
#endif // !XB1
            m_soundEmitter            = new MyEntity3DSoundEmitter(this, true);
            m_useConveyorSystem.Value = true;
#if !XB1 // !XB1_SYNC_NOREFLECTION
            SyncType.Append(m_gunBase);
#endif // !XB1
        }
        public MySmallGatlingGun()
        {
            m_rotationAngle        = MyUtils.GetRandomRadian();
            m_lastTimeShoot        = MyConstants.FAREST_TIME_IN_PAST;
            m_smokeLastTime        = MyConstants.FAREST_TIME_IN_PAST;
            m_smokesToGenerate     = 0;
            m_cannonMotorEndPlayed = true;
            m_rotationTimeout      = (float)MyGatlingConstants.ROTATION_TIMEOUT + MyUtils.GetRandomFloat(-500, +500);

            m_soundEmitter = new MyEntity3DSoundEmitter(this);

            m_gunBase = new MyGunBase();

            NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME | MyEntityUpdateEnum.EACH_10TH_FRAME;
            Render.NeedsDrawFromParent = true;

            Render = new MyRenderComponentSmallGatlingGun();
            AddDebugRenderComponent(new MyDebugRenderComponentSmallGatlingGun(this));

            SyncType.Append(m_gunBase);
        }