Files
Ultimate-Fishing-Simulator-…/Assets/Scripts/Assembly-CSharp/ECM2/Walkthrough/EX74/OneWayPlatform.cs
2026-03-04 09:37:33 +08:00

34 lines
649 B
C#

using UnityEngine;
namespace ECM2.Walkthrough.EX74
{
public class OneWayPlatform : MonoBehaviour
{
public Collider platformCollider;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Character component = other.GetComponent<Character>();
if ((bool)component)
{
component.IgnoreCollision(platformCollider);
}
}
}
private void OnTriggerExit(Collider other)
{
if (other.CompareTag("Player"))
{
Character component = other.GetComponent<Character>();
if ((bool)component)
{
component.IgnoreCollision(platformCollider, ignore: false);
}
}
}
}
}