Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/OculusSampleFramework/GrabManager.cs
2026-02-21 16:45:37 +08:00

32 lines
713 B
C#

using UnityEngine;
namespace OculusSampleFramework
{
public class GrabManager : MonoBehaviour
{
private Collider m_grabVolume;
public Color OutlineColorInRange;
public Color OutlineColorHighlighted;
private void OnTriggerEnter(Collider otherCollider)
{
DistanceGrabbable componentInChildren = otherCollider.GetComponentInChildren<DistanceGrabbable>();
if ((bool)componentInChildren)
{
componentInChildren.InRange = true;
}
}
private void OnTriggerExit(Collider otherCollider)
{
DistanceGrabbable componentInChildren = otherCollider.GetComponentInChildren<DistanceGrabbable>();
if ((bool)componentInChildren)
{
componentInChildren.InRange = false;
}
}
}
}