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

public class Grass : MonoBehaviour
{

    public GameObject player;
    private Animator grassAnimator;
    // Start is called before the first frame update
    void Start()
    {
        grassAnimator = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnTriggerEnter2D(Collider2D other) 
    {
        if (other.gameObject.name=="player")
        {
            grassAnimator.SetTrigger("PlayerCome!");
        }
    }
}
