mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
24 lines
617 B
C#
24 lines
617 B
C#
using UnityEngine;
|
|
|
|
namespace NewHorizons.Components.Volumes
|
|
{
|
|
public class MapRestrictionVolume : BaseVolume
|
|
{
|
|
public override void OnTriggerVolumeEntry(GameObject hitObj)
|
|
{
|
|
if (hitObj.CompareTag("PlayerDetector"))
|
|
{
|
|
Locator.GetMapController()?.OnPlayerEnterMapRestriction();
|
|
}
|
|
}
|
|
|
|
public override void OnTriggerVolumeExit(GameObject hitObj)
|
|
{
|
|
if (hitObj.CompareTag("PlayerDetector"))
|
|
{
|
|
Locator.GetMapController()?.OnPlayerExitMapRestriction();
|
|
}
|
|
}
|
|
}
|
|
}
|