/// <summary> /// 枪械开火 /// </summary> /// <param name="weaponState"></param> public static void PerformOnGunFire(WeaponLogic.IPlayerWeaponState weaponState) { if (AudioInfluence.IsForbidden || AKAudioEntry.Dispatcher == null) { return; } NewWeaponConfigItem weaponCfg = SingletonManager.Get <WeaponConfigManager>().GetConfigById(weaponState.CurrentWeapon); AKAudioEntry.AudioAssert(weaponCfg != null, string.Format("weapon config id [{0}] not find", weaponState.CurrentWeapon)); //假装有event AKAudioEntry.Dispatcher.PostEvent(testWeaponEvent, weaponState.CurrentWeaponGo); }
/// <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); }
/// <summary> /// 枪械切换 /// </summary> /// <param name="weaponState"></param> public static void PerformOnGunSwitch(WeaponLogic.IPlayerWeaponState weaponState) { PerformOnGunSwitch(weaponState.CurrentWeapon); }