UnityGameProjectsCode / RelianceGame / Inventory Control / SlotGetToolTip.cs
SlotGetToolTip.cs
Raw
using UnityEngine;

public class SlotGetToolTip : MonoBehaviour
{
    private MouseToolTip toolTip;
    private Slot thisSlot;

    private void Awake()
    {
        toolTip = GameObject.Find("HUBUI/Tooltip").GetComponent<MouseToolTip>();
        thisSlot = transform.parent.GetComponent<Slot>();
    }

    public void ShowToolTipInfo()
    {
        toolTip.ShowSlotInfo(thisSlot);
    }

    public void HideToolTipInfo()
    {
        toolTip.HideToolTip();
    }
}