예제 #1
0
        internal static void PlayMeleeAttack(int weaponId, AudioGrp_MeleeAttack op, AkGameObj target,
                                             ref int audioEventId)
        {
            AudioEventItem evtConfig = SingletonManager.Get <AudioWeaponManager>().FindById(weaponId, FilterLeft1);

            if (evtConfig != null)
            {
                AudioEntry.Dispatcher.SetSwitch(target, op);
                AudioEntry.Dispatcher.PostEvent(evtConfig, target, true);
                audioEventId = evtConfig.Id;
            }
            else
            {
                AudioEntry.Logger.ErrorFormat("Audio Post event failed,target:{0},evtCfg:{1}", target, weaponId);
            }
        }
예제 #2
0
 internal void SetSwitch(AkGameObj target, AudioGrp_MeleeAttack meleeAttack)
 {
     SetSwitch(target, (int)AudioGrp_MeleeAttack.Id, (int)meleeAttack);
 }