示例#1
0
        public static void PlayMeleeAttackAudio(AudioMeleeAtkEvent meleeEvent)
        {
            if (IsUnavailable())
            {
                return;
            }
            var target = GetEmitter(meleeEvent);

            PlayEventAudio(meleeEvent.eventId, target);
        }
示例#2
0
        internal static void PlayWeaponFireAudio(AudioMeleeAtkEvent meleeAtkEvent)
        {
            if (IsUnavailable())
            {
                return;
            }
            var target = GetEmitter(meleeAtkEvent);

            //        DebugUtil.MyLog("Play Fire:{0},is Mute:{1}",target.transform.position,target.IsMute);
            PlayEventAudio(meleeAtkEvent.eventId, target);
        }
示例#3
0
        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);
            }
        }
示例#4
0
        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);
            }
        }