Пример #1
0
        public static AudioGrp_Footstep ToFootState(this AudioEnvironmentSourceType sourceType)
        {
            switch (sourceType)
            {
            case AudioEnvironmentSourceType.Walk:
                return(AudioGrp_Footstep.Walk);

            case AudioEnvironmentSourceType.Squat:
                return(AudioGrp_Footstep.Squat);

            case AudioEnvironmentSourceType.Crawl:
                return(AudioGrp_Footstep.Crawl);

            //case AudioEnvironmentSourceType.Land:
            //   return AudioGrp_Footstep.lan;
            default:
                return(AudioGrp_Footstep.None);
            }
        }
Пример #2
0
        public static void PlayEnvironmentAudio(AudioEnvironmentSourceType sourceType,Vector3 Position, GameObject target)
        {
            if (SharedConfig.IsServer|| AKAudioEntry.Dispatcher == null)
                return;
                PlayEnvironmentAudio(sourceType.ToFootState(), Position, target);
        

            //public SoundConfigItem Convert(PlayerEntity playerEntity, EPlayerSoundType playerSoundType)
            //{
            //    switch ((EPlayerSoundType)playerSoundType)
            //    {
            //        case EPlayerSoundType.Walk:
            //            return ConvertTerrainSound(playerEntity, ETerrainSoundType.Walk);
            //        case EPlayerSoundType.Squat:
            //            return ConvertTerrainSound(playerEntity, ETerrainSoundType.Squat);
            //        case EPlayerSoundType.Crawl:
            //            return ConvertTerrainSound(playerEntity, ETerrainSoundType.Crawl);
            //        case EPlayerSoundType.Land:
            //            return ConvertTerrainSound(playerEntity, ETerrainSoundType.Land);
            //        default:
            //            return ConvertPlayerSound(playerEntity, playerSoundType);
            //    }
            //}
        }