Working magnet and crane AI

This commit is contained in:
nothke
2024-08-17 16:13:26 +02:00
parent 601c99ebf6
commit b2d8ac944c
14 changed files with 1764 additions and 3176 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class EnterTriggerSender : MonoBehaviour
{
public UnityEvent onEnterEvent;
public UnityEvent onExitEvent;
public Collider triggeredCollider;
private void OnTriggerEnter(Collider other)
{
Debug.Log("Entered: " + other.name);
triggeredCollider = other;
onEnterEvent.Invoke();
}
private void OnTriggerExit(Collider other)
{
Debug.Log("Exited: " + other.name);
triggeredCollider = other;
onExitEvent.Invoke();
}
}