Ejemplo n.º 1
0
        public IAccuracyLogic CreateAccuracyLogic(AccuracyLogicConfig config)
        {
            if (config is BaseAccuracyLogicConfig)
            {
                return(new BaseAccuracyLogic());
            }
            else if (config is PistolAccuracyLogicConfig)
            {
                return(new PistolAccuracyLogic());
            }

            return(null);
        }
Ejemplo n.º 2
0
//        public IWeaponFireUpdate CreateFireUpdater(WeaponResConfigItem newCfg,
//        WeaponConfig config)
//        {
//            IWeaponFireUpdate rc = null;
//            var weaponLogicConfig = config.WeaponLogic;
//            if (weaponLogicConfig is WeaponConfigNs.DefaultWeaponBehaviorConfig)
//            {
//                rc = new CommonWeaponFireUpdate();
//            }
//            else if (weaponLogicConfig is DoubleWeaponBehaviorConfig)
//            {
//                rc = new DoubleWeaponFireUpdate(null, null);
//            }
//            return rc;
//        }

        public IAccuracyCalculator CreateAccuracyCalculator(AccuracyLogicConfig config)
        {
            if (config is BaseAccuracyLogicConfig)
            {
                return(new CommonAccuracyCalculator());
            }
            if (config is PistolAccuracyLogicConfig)
            {
                return(new PistolAccuracyCalculator());
            }

            return(null);
        }
        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);
        }