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

public class Weapon : MonoBehaviour
{
    private Player player;
    // Start is called before the first frame update
    void Start()
    {
        player = GetComponentInParent<Player>();
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(null != player)
        {
            player.TriggerEnter2D(collision);
        }

        //Debug.Log("player collided with food");
    }

    private void OnTriggerExit2D(Collider2D collision)
    {
        if(player !=null)
        {
            player.TriggerExit2D(collision);
        }
    }
}
