Files
MMI2-Project/MMI2-project/Assets/HeneGames/Simple Airplane Controller/Scripts/SimpleAirPlaneCollider.cs
2026-05-30 18:11:47 +02:00

26 lines
685 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace HeneGames.Airplane
{
public class SimpleAirPlaneCollider : MonoBehaviour
{
public bool collideSometing;
[HideInInspector]
public SimpleAirPlaneController controller;
private void OnTriggerEnter(Collider other)
{
if (other.GetComponentInParent<RingCheckpoint>() != null)
return;
if (other.gameObject.GetComponent<SimpleAirPlaneCollider>() == null &&
other.gameObject.GetComponent<LandingArea>() == null)
{
collideSometing = true;
}
}
}
}