Beispiel #1
0
    private void Awake()
    {
        Instance = this;
        BackgroundRectTransform = transform.Find("background").GetComponent <RectTransform>();
        TextMeshPro             = transform.Find("text").GetComponent <TextMeshProUGUI>();
        rectTransform           = transform.GetComponent <RectTransform>();

        HideTooltip();
        //ShowTooltip("Hello World");
    }
Beispiel #2
0
    private void Update()
    {
        if (_isHovered && (_text != null || _tooltipText != null))
        {
            _internTimer += Time.deltaTime;

            if (_internTimer >= _timer)
            {
                TooltipScreenSpaceUI.ShowTooltip_Static(_text ?? _tooltipText.GetLocalizedString(this));
                _isHovered = false;
            }
        }
    }
Beispiel #3
0
 public void OnPointerExit(PointerEventData eventData)
 {
     _isHovered   = false;
     _internTimer = 0f;
     TooltipScreenSpaceUI.HideTooltip_Static();
 }
Beispiel #4
0
 public void ResetToolTipText()
 {
     _tooltipText = null;
     TooltipScreenSpaceUI.HideTooltip_Static();
 }
Beispiel #5
0
 public void HideMyText()
 {
     TooltipScreenSpaceUI.HideTooltip_Static();
 }
Beispiel #6
0
 public void ShowMyText()
 {
     TooltipScreenSpaceUI.ShowTooltip_Static(_description);
 }
 private void Awake()
 {
     Instance = this;
     HideTooltip();
 }