mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
23 lines
680 B
C#
23 lines
680 B
C#
using NewHorizons.Components.Volumes;
|
|
using NewHorizons.External.Modules.Volumes.VolumeInfos;
|
|
using UnityEngine;
|
|
|
|
namespace NewHorizons.Builder.Volumes
|
|
{
|
|
public static class SpeedLimiterVolumeBuilder
|
|
{
|
|
public static SpeedLimiterVolume Make(GameObject planetGO, Sector sector, SpeedLimiterVolumeInfo info)
|
|
{
|
|
var volume = VolumeBuilder.Make<SpeedLimiterVolume>(planetGO, ref sector, info);
|
|
|
|
volume.maxSpeed = info.maxSpeed;
|
|
volume.stoppingDistance = info.stoppingDistance;
|
|
volume.maxEntryAngle = info.maxEntryAngle;
|
|
|
|
volume.gameObject.SetActive(true);
|
|
|
|
return volume;
|
|
}
|
|
}
|
|
}
|