Beispiel #1
0
        private void Start()
        {
            //Heck hack
            if (!mod.GetSettings().GetValue <bool>("Better Footsteps", "enable"))
            {
                return;
            }

            DisableBuiltInFootsteps();

            if (footstepsComponent == null)
            {
                footstepsComponent = GameManager.Instance.PlayerObject.AddComponent <BetterFootstepsComponentPlayer>();
            }

            ApplyFootsteps(footstepsComponent);

            mod.IsReady = true;

            LoadSettings(mod.GetSettings());

            //GameManager.OnEncounter += UpdateEnemyFootsteps;
            //PlayerEnterExit.OnTransitionDungeonInterior += OnTransitionDungeonInterior;
        }
Beispiel #2
0
        private void ApplyFootsteps(BetterFootstepsComponent footsteps)
        {
            footsteps.FootstepSoundBuilding.AddAudioClips(SoundUtility.TryImportAudioClips("sfx_footstep_wood", "wav", 4, false));
            footsteps.FootstepSoundBuilding.SetPitchRange(0.8f, 1.2f);

            footsteps.FootstepSoundDungeon.AddAudioClips(SoundUtility.TryImportAudioClips("sfx_footstep_stone", "wav", 4, false));
            footsteps.FootstepSoundDungeon.SetPitchRange(0.8f, 1.2f);

            footsteps.FootstepsArmor.AddAudioClips(SoundUtility.TryImportAudioClips("sfx_footstep_armor_light", "wav", 11, false));
            footsteps.FootstepsArmor.SetPitchRange(1f, 1.2f);

            footsteps.FootstepSoundOutside.AddAudioClips(SoundUtility.TryImportAudioClips("sfx_footstep_crunchy-grass", "wav", 4, false));
            footsteps.FootstepSoundOutside.SetPitchRange(0.8f, 1.2f);

            footsteps.FootstepSoundShallow.AddAudioClips(SoundUtility.TryImportAudioClips("sfx_footstep_water", "wav", 6, false));
            footsteps.FootstepSoundShallow.SetPitchRange(0.8f, 1.2f);

            footsteps.FootstepSoundSubmerged.AddSoundClip(SoundClips.SplashSmall);
            footsteps.FootstepSoundSubmerged.SetPitchRange(0.8f, 1.2f);

            footsteps.FootstepSoundSnow.AddSoundClip(SoundClips.PlayerFootstepSnow1);
            footsteps.FootstepSoundSnow.AddSoundClip(SoundClips.PlayerFootstepSnow2);
            footsteps.FootstepSoundSnow.SetPitchRange(0.8f, 1.2f);
        }