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

public class InformParentAboutCollision : MonoBehaviour
{
    private void OnTriggerEnter(Collider collider)
    {
        if (transform.parent.GetComponent<Piece>().state != "jumping") return;
        if (collider.transform.GetComponent<Piece>() == null) return;
        transform.parent.GetComponent<Piece>().InformHit(collider);
    }
}
