using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.U2D;

public class EventTrigger : MonoBehaviour
{
    public Character owner;
    public Rivet triggedRivet;

    private void Awake()
    {
        owner = GetComponentInParent<Character>();
    }

    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent<Rivet>())
        {
            triggedRivet = other.GetComponent<Rivet>();
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if (other.GetComponent<Rivet>())
        {
            triggedRivet = null;
        }
    }
}
