added tooltips

This commit is contained in:
Vladimir Koshevarov
2022-11-29 19:09:00 +02:00
parent 2167b43c29
commit 73f06d8754
33 changed files with 1264 additions and 250 deletions
+22
View File
@@ -0,0 +1,22 @@
using UnityEngine;
public class ToolTipSystem : MonoBehaviour
{
private static ToolTipSystem _current;
[SerializeField] private ToolTip _toolTip;
public void Awake()
{
_current = this;
_current._toolTip.gameObject.SetActive(false);
}
public static void Show(string content, string header = "")
{
_current._toolTip.SetText(content, header);
_current._toolTip.gameObject.SetActive(true);
}
public static void Hide()
{
_current._toolTip.gameObject.SetActive(false);
}
}