mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add audioDistance to tornados (#178)
This commit is contained in:
parent
7a7dc7f57a
commit
b0bc48465c
@ -116,8 +116,9 @@ namespace NewHorizons.Builder.Props
|
||||
tornadoGO.transform.localScale = Vector3.one * scale;
|
||||
|
||||
// Resize the distance it can be heard from to match roughly with the size
|
||||
audioSource.maxDistance = 10 * scale;
|
||||
audioSource.minDistance = scale;
|
||||
var maxDistance = info.audioDistance == 0 ? 10 * scale : info.audioDistance;
|
||||
audioSource.maxDistance = maxDistance;
|
||||
audioSource.minDistance = maxDistance / 10f;
|
||||
|
||||
var controller = tornadoGO.GetComponent<TornadoController>();
|
||||
controller.SetSector(sector);
|
||||
|
||||
5
NewHorizons/External/Modules/PropModule.cs
vendored
5
NewHorizons/External/Modules/PropModule.cs
vendored
@ -234,6 +234,11 @@ namespace NewHorizons.External.Modules
|
||||
/// 0.1.
|
||||
/// </summary>
|
||||
public float wanderRate;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum distance at which you'll hear the sounds of the cyclone. If not set it will scale relative to the size of the cyclone.
|
||||
/// </summary>
|
||||
public float audioDistance;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user