public IWeaponFireController GetFireController(WeaponAllConfigs configs, DefaultWeaponAbstractFireFireLogicConfig config) { IWeaponFireController v = null; if (_cache.TryGetValue(configs.S_Id, out v)) { return(_cache[configs.S_Id]); } var defaultCfg = config as DefaultFireLogicConfig; if (null != defaultCfg) { v = CreateCommonFireController(configs, defaultCfg); _cache[configs.S_Id] = v; return(v); } var meleeCfg = config as MeleeFireLogicConfig; if (null != meleeCfg) { v = new MeleeWeaponFireController(meleeCfg); _cache[configs.S_Id] = v; return(v); } var throwingCfg = config as ThrowingFireLogicConfig; if (null != throwingCfg) { v = new ThrowingWeaponFireController(throwingCfg, configs.NewWeaponCfg); _cache[configs.S_Id] = v; return(v); } if (configs.NewWeaponCfg.Type != (int)EWeaponType_Config.TacticWeapon) { Logger.ErrorFormat("no firelogic for weapon {0}", configs.S_Id); } return(null); }
public CommonWeaponFireUpdate(IWeaponFireController controller) { fireController = controller; }
public void SetController(IWeaponFireController controller) { fireController = controller; }
public DoubleWeaponFireUpdate(IWeaponFireController leftWeaponFire, IWeaponFireController rightWeaponFire) { _leftWeaponFire = leftWeaponFire; _rightWeaponFire = rightWeaponFire; }
public CommonWeaponFireUpdate(IWeaponFireController controller) { SetController(controller); }