using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;

namespace Assets.Scripts
{
    public class TooltipHandler : MonoBehaviour
    {
        public GameObject tooltip;
        Player player;
        UIHandler uihandler;

        // Start is called before the first frame update
        void Start()
        {
            player = GameObject.Find("Player").GetComponent<Player>();
            uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
        }

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

        }

        public void showTooltip(string text)
        {
            tooltip.transform.Find("txtTooltip").GetComponent<Text>().text = text;
            tooltip.transform.localScale = new Vector3(1,1,1);
        }

        public void hideToolTip()
        {
            tooltip.transform.localScale = new Vector3(0,0,0);
        }
    }

}