Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="contexts"></param>
        /// <param name="entity"></param>
        /// <param name="e"></param>
        public override void DoEventClient(Entitas.IContexts contexts, IEntity entity, IEvent e)
        {
            if ((entity as PlayerEntity).isFlagSelf)
            {
                return;
            }

            //  var controller = (entity as PlayerEntity).AudioController();
            AudioEvent audioEvent = e as AudioEvent;

            //     DebugUtil.MyLog("Play event :"+audioEvent.EventType);
            switch (audioEvent.EventType)
            {
            case EEventType.AFootstep:
                GameAudioMedia.PlayFootstepAudio(audioEvent as AudioFootstepEvent);
                break;

            case EEventType.AJumpstep:
                GameAudioMedia.PlayJumpstepAudio(audioEvent as AudioJumpstepEvent);
                break;

            case EEventType.AWeaponFire:
                GameAudioMedia.PlayWeaponFireAudio(audioEvent as AudioWeaponFireEvent);
                break;

            case EEventType.ADefault:
                GameAudioMedia.PlayUniqueEventAudio(audioEvent as AudioDefaultEvent);
                break;

            case EEventType.APullbolt:
                GameAudioMedia.PlayWeaponReloadAudio(audioEvent as AudioPullboltEvent);
                break;

            default:
                break;
            }


            // GameAudioMedium.ProcessWeaponAudio(playerEntity,allContexts,(item)=>item.Fire);
            // if (playerEntity.appearanceInterface.Appearance.IsFirstPerson)
            // {

            // }
            // else
            // {
            ////     GameAudioMedium.PerformOnGunFire();
            // }
        }
Example #2
0
 public override void RewindTo(AudioEvent right)
 {
     base.RewindTo(right);
     groupOne = ((AudioDoubleGroupEvent)right).groupOne;
     groupTwo = ((AudioDoubleGroupEvent)right).groupTwo;
 }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="contexts"></param>
        /// <param name="entity"></param>
        /// <param name="e"></param>
        public override void DoEventClient(Entitas.IContexts contexts, IEntity entity, IEvent e)
        {
            if (SharedConfig.IsMute)
            {
                return;
            }
            //var controller = (entity as PlayerEntity).AudioController();
            var targetPlayerEntity = entity as PlayerEntity;
            int cmrEntityId        = (contexts as Contexts).player.flagSelfEntity.gamePlay.CameraEntityId;
            // foreach(PlayerEntity playerEntity in (contexts as Contexts).player.GetEntities())
            // {
            //    if(playerEntity.gamePlay.CameraEntityId == player.entityKey.Value.EntityId)
            //     {
            //         //TODO
            //         observePlayer = playerEntity;
            //         break;
            //     }
            // }

            AudioEvent audioEvent = e as AudioEvent;

            //DebugUtil.MyLog("Play other event :"+audioEvent.EventType);
            switch (audioEvent.EventType)
            {
            case EEventType.AFootstep:
                GameAudioMedia.PlayFootstepAudio(audioEvent as AudioFootstepEvent);
                break;

            case EEventType.AJumpstep:
                GameAudioMedia.PlayJumpstepAudio(audioEvent as AudioJumpstepEvent);
                break;

            case EEventType.AWeaponFire:
                GameAudioMedia.PlayWeaponFireAudio(audioEvent as AudioWeaponFireEvent);
                break;

            case EEventType.ADefault:
                if (cmrEntityId == targetPlayerEntity.entityKey.Value.EntityId)
                {
                    float RTPCvalue = 1;
                    GameAudioMedia.PlayUniqueEventAudio(audioEvent as AudioDefaultEvent, RTPCvalue);
                    break;
                }
                else
                {
                    float RTPCvalue = 0;
                    GameAudioMedia.PlayUniqueEventAudio(audioEvent as AudioDefaultEvent, RTPCvalue);
                    break;
                }

            case EEventType.APullbolt:
                GameAudioMedia.PlayWeaponReloadAudio(audioEvent as AudioPullboltEvent);
                break;

            case EEventType.AMeleeAttack:
                GameAudioMedia.PlayMeleeAttackAudio(audioEvent as AudioMeleeAtkEvent);
                break;

            default:
                break;
            }


            // GameAudioMedium.ProcessWeaponAudio(playerEntity,allContexts,(item)=>item.Fire);
            // if (playerEntity.appearanceInterface.Appearance.IsFirstPerson)
            // {

            // }
            // else
            // {
            ////     GameAudioMedium.PerformOnGunFire();
            // }
        }
Example #4
0
 public virtual void RewindTo(AudioEvent right)
 {
     //  subType         = right.subType;
     relatedPos      = right.relatedPos;
     relatedRocation = right.relatedRocation;
 }
Example #5
0
 public override void RewindTo(AudioEvent right)
 {
     base.RewindTo(right);
     EventId = ((AudioDefaultEvent)right).EventId;
 }
Example #6
0
 public override void RewindTo(AudioEvent right)
 {
     base.RewindTo(right);
     groupOne = ((AudioSimpleGroupEvent)right).groupOne;
 }
Example #7
0
 public override void RewindTo(AudioEvent right)
 {
     base.RewindTo(right);
     eventId = ((AudioMeleeAtkEvent)right).eventId;
 }
Example #8
0
 public override void RewindTo(AudioEvent right)
 {
     base.RewindTo(right);
     WeaponId = ((AudioPullboltEvent)right).WeaponId;
 }