Ejemplo n.º 1
0
        public void PlayFootstepAudio(AudioGrp_Footstep stepState)

        {
            var footMatType = FootMatType;

            GameAudioMedia.PlayFootstepAudio(stepState, footMatType, EmitterObject);
            AudioFootstepEvent audioEvent =
                (AudioFootstepEvent)EventInfos.Instance.Allocate(EEventType.AFootstep, false);

            audioEvent.Initialize(stepState, FootMatType,
                                  new Vector3(PlayerObject.transform.position.x, 0, PlayerObject.transform.position.z),
                                  PlayerObject.transform.eulerAngles);
            entity.localEvents.Events.AddEvent(audioEvent);
        }
        public override void PlayFootstepAudioC(AudioGrp_Footstep stepState)
        {
            if (AkSoundEngineController.AudioMgrGetter == null)
            {
                return;
            }
            var footMatType = footstepCmdExec();
            var softVal     = entity.StateInteractController().GetCurrStates().Contains(EPlayerState.Walk) ? 1 : 0;

            AkSoundEngine.SetRTPCValue(Wwise_IDs.FootstepSoft, softVal, EmitterObject.gameObject);
            GameAudioMedia.PlayFootstepAudio(stepState, footMatType, EmitterObject);
            entity.playerClientUpdate.FootstepFrameGroup = (byte)stepState;
            entity.playerClientUpdate.LastMatType        = (byte)footMatType;
            //                AudioFootstepEvent audioEvent =(AudioFootstepEvent) EventInfos.Instance.Allocate(EEventType.AFootstep, false);ErrorCode_SelectedChildNotAvailable
            //                audioEvent.Initialize(stepState, FootMatType,
            //                    new Vector3(PlayerObject.transform.position.x, 0, PlayerObject.transform.position.z),
            //                    PlayerObject.transform.eulerAngles);
            //                entity.localEvents.Events.AddEvent(audioEvent);
        }