public IFireBulletModeLogic CreateFireReadyLogic(FireModeLogicConfig config, CommonFireConfig common)
 {
     if (config is DefaultFireModeLogicConfig)
     {
         return(new FireBulletModeLogic(config as DefaultFireModeLogicConfig, common));
     }
     return(null);
 }
Beispiel #2
0
 public IFireChecker CreateSpecialReloadChecker(CommonFireConfig commonFireConfig)
 {
     if (null != commonFireConfig && commonFireConfig.SpecialReloadCount > 0)
     {
         return(new SpecialReloadChecker());
     }
     return(null);
 }
 public IFireActionLogic CreateFireActionLogic(NewWeaponConfigItem config, CommonFireConfig commonConfig, IWeaponSoundLogic weaponSoundLogic)
 {
     if (SingletonManager.Get <WeaponConfigManager>().IsSpecialType(config.Id, ESpecialWeaponType.SniperFrie))
     {
         return(new SpecialFireActionLogic(commonConfig, weaponSoundLogic));
     }
     else
     {
         return(new DefaultFireActionLogic(commonConfig, weaponSoundLogic));
     }
 }
        public IAccuracyLogic CreateAccuracyLogic(AccuracyLogicConfig config, CommonFireConfig common)
        {
            if (config is BaseAccuracyLogicConfig)
            {
                return(new BaseAccuracyLogic(config as BaseAccuracyLogicConfig));
            }
            else if (config is PistolAccuracyLogicConfig)
            {
                return(new PistolAccuracyLogic(config as PistolAccuracyLogicConfig));
            }

            return(null);
        }
Beispiel #5
0
        /// <summary>
        /// 枪械模式更换
        /// </summary>
        /// <param name="weaponState"></param>
        public static void PerformOnGunModelSwitch(CommonFireConfig comCfg, WeaponLogic.IPlayerWeaponState weaponState)
        {
            if (AudioInfluence.IsForbidden || AKAudioEntry.Dispatcher == null)
            {
                return;
            }
            // NewWeaponConfigItem weaponCfg = WeaponConfigManager.Instance.GetConfigById(weaponState.CurrentWeapon);
            //   var fireModelCfg = WeaponConfigManager.Instance.GetFireModeCountById(weaponState.CurrentWeapon);
            AKEventCfg evtCfg = AudioConfigSimulator.SimAKEventCfg1();

            testWeaponModel = testWeaponModel == "Gun_shot_mode_type_single" ? "Gun_shot_mode_type_triple" : "Gun_shot_mode_type_single";
            AKAudioEntry.Dispatcher.VarySwitchState(evtCfg.switchGroup, testWeaponModel, weaponState.CurrentWeaponGo);
        }
        public IKickbackLogic CreateKickbackLogic(KickbackLogicConfig config, CommonFireConfig common)
        {
            if (config is RifleKickbackLogicConfig)
            {
                return(new RifleKickbackLogic(config as RifleKickbackLogicConfig, common));
            }
            else if (config is FixedKickbackLogicConfig)
            {
                return(new FixedKickbackLogic(config as FixedKickbackLogicConfig));
            }


            return(null);
        }
        public IAutoFireLogic CreateAutoFireLogic(FireModeLogicConfig config, CommonFireConfig common)
        {
            var modeConfig = config as DefaultFireModeLogicConfig;

            if (null != modeConfig)
            {
                foreach (var mode in modeConfig.AvaiableModes)
                {
                    if (mode == EFireMode.Burst)
                    {
                        return(new AutoFireLogic(modeConfig.BurstCount, modeConfig.BurstAttackInnerInterval, modeConfig.BurstAttackInterval));
                    }
                }
            }
            return(new DummyAutoFireLogic());
        }
        public ISpreadLogic CreateSpreadLogic(SpreadLogicConfig config, CommonFireConfig common)
        {
            if (config is FixedSpreadLogicConfig)
            {
                return(new FixedSpreadLogic(config as FixedSpreadLogicConfig));
            }
            else if (config is PistolSpreadLogicConfig)
            {
                return(new PistolSpreadLogic(config as PistolSpreadLogicConfig));
            }
            else if (config is SniperSpreadLogicConfig)
            {
                return(new SniperSpreadLogic(config as SniperSpreadLogicConfig));
            }
            else if (config is RifleSpreadLogicConfig)
            {
                return(new RifleSpreadLogic(config as RifleSpreadLogicConfig));
            }

            return(null);
        }
 public override IBulletFactory CreateBulletFactory(BulletConfig config, CommonFireConfig common)
 {
     return(new BulletFactory(_bulletContext, _entityIdGenerator, _soundEntityFactory, _bulletEntityFactory, config));
 }
Beispiel #10
0
 public RifleKickbackLogic(RifleKickbackLogicConfig config, CommonFireConfig common) : base(config)
 {
     _common = common;
 }
 public void OnSwitchMode(CommonFireConfig common)
 {
     // _playerEntity.soundManager.Value.PlayOnce(EPlayerSoundType.ChangeMode);
     Core.Audio.GameAudioMedium.PerformOnGunModelSwitch(common, this);
     //_playerEntity.weaponLogic.WeaponSound.PlaySound(EWeaponSoundType.SwitchFireMode);
 }
        public IFireBulletCounter CreateContinuesShootLogic(FireCounterConfig config, CommonFireConfig common)
        {
            if (config is RifleFireCounterConfig)
            {
                return(new RifleFireBulletCounter(config as RifleFireCounterConfig));
            }

            return(null);
        }
 public abstract IBulletFactory CreateBulletFactory(BulletConfig config, CommonFireConfig common);
 public IThrowingContainer CreateThrowingLogic(CommonFireConfig config)
 {
     return(new BaseWeaponThrowingLogic(config, _attachmentManager));
 }
 public IBulletContainer CreateBulletLogic(CommonFireConfig config)
 {
     return(new BaseWeaponBulletLogic(config, _attachmentManager));
 }
Beispiel #16
0
 public FireBulletModeLogic(DefaultFireModeLogicConfig config, CommonFireConfig common)
 {
     _common = common;
     _config = config;
 }