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

public class TreeRootEggLaying : MonoBehaviour {

    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.name == "player")
        {
            GameObject.Find("QuestTracker").GetComponent<QuestTrackerScript>().Did(1);
            other.gameObject.GetComponent<PlayerScript>().LayEggs();
            GameObject.Find("End").GetComponent<CircleCollider2D>().enabled = true;
            GameObject.Find("End").GetComponent<SpriteRenderer>().enabled = true;
            Destroy(gameObject);
        }
        else print(other.gameObject.name);
        

    }
}
