Lethal Company
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install with App

Details

Latest version
0.0.0
Last Updated
First Uploaded
Downloads
53K
Likes
1
Size
9.1KB
Dependants

Categories

Tags

Deprecated

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
    }
}
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.