using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; using Assets.Scripts.Player; namespace Assets.Scripts { public class TooltipHandler : MonoBehaviour { public GameObject tooltip; PlayerGameObject player; UIHandler uihandler; // Start is called before the first frame update void Start() { player = GameObject.Find("Player").GetComponent(); uihandler = GameObject.Find("UIHandler").GetComponent(); } // Update is called once per frame void Update() { } public void showTooltip(string text) { tooltip.transform.Find("txtTooltip").GetComponent().text = text; tooltip.transform.localScale = new Vector3(1,1,1); } public void hideToolTip() { tooltip.transform.localScale = new Vector3(0,0,0); } } }