public override void PlayMeleeAttackAudio(int weaponId, int attackType) { int audioEventId = SingletonManager.Get <AudioWeaponManager>().FindById(weaponId).Left1; if (audioEventId > 0) { AudioMeleeAtkEvent audioEvent = EventInfos.Instance.Allocate(EEventType.AMeleeAttack, false) as AudioMeleeAtkEvent; audioEvent.Initialize(audioEventId, attackType, FireMuzzleObject.position, FireMuzzleObject.eulerAngles); entity.localEvents.Events.AddEvent(audioEvent); } }
public void PlayMeleeAttackAudio(int weaponId, int attackType) { int audioEventId = 0; GameAudioMedia.PlayMeleeAttack(weaponId, (AudioGrp_MeleeAttack)attackType, EmitterObject, ref audioEventId); if (audioEventId > 0) { AudioMeleeAtkEvent audioEvent = EventInfos.Instance.Allocate(EEventType.AMeleeAttack, false) as AudioMeleeAtkEvent; audioEvent.Initialize(audioEventId, attackType, WeaponObject.transform.position, WeaponObject.transform.eulerAngles); entity.localEvents.Events.AddEvent(audioEvent); } }