You are viewing a potentially older version of this package.
View all versions.
AudibleDistanceLib
A small library for audible distance determination.
Date uploaded | 6 months ago |
Version | 0.0.0 |
Download link | JustJelly-AudibleDistanceLib-0.0.0.zip |
Downloads | 34745 |
Dependency string | JustJelly-AudibleDistanceLib-0.0.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
AudibleDistanceLib
A small library for audible distance determination.
Usage
Example
using static AudibleDistanceLib.AudibleDistanceLib;
[HarmonyPrefix]
[HarmonyPatch(nameof(AudioSource.PlayOneShotHelper), new[] { typeof(AudioSource), typeof(AudioClip), typeof(float) })]
public static void PlayOneShotHelper_Prefix(AudioSource source, ref AudioClip clip, float volumeScale)
{
if (IsInWithinAudiableDistance(GameNetworkManager.Instance, audioSource, volumeScale, minimumAudibleVolume: 12f))
{
// do something
}
}
CHANGELOG
Changelog
0.0.0 - 2023-12-10
- Initial commit