コード例 #1
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);
            }
        }
コード例 #2
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);
            }
        }