示例#1
0
 private void Update()
 {
     if (hovering)
     {
         if (!hoverBlockActive && timeStartedHovering + 0.8f <= Time.unscaledTime)
         {
             SkillButtonsHoverText.HoverText("Flee\n50% success chance");
             hoverBlockActive = true;
         }
     }
 }
 // Start is called before the first frame update
 private void Start()
 {
     if (GetSkillButtonsHoverText == null)
     {
         GetSkillButtonsHoverText = this;
     }
     else if (GetSkillButtonsHoverText != this)
     {
         Destroy(gameObject);
     }
     textbox = textbox != null ? textbox : GetComponentInChildren<TextMeshProUGUI>();
     TextBox = textbox;
     StopHovering();
 }
示例#3
0
    private void StartHovering()
    {
        string toSend = Skill.HoverDesc(Player);

        if (Skill.HasCoolDown)
        {
            toSend += $"\nCooldown: {Skill.CoolDown} turns";
            if (!userSkill.Ready)
            {
                toSend += $"\n{userSkill.TurnsLeft} turns left";
            }
        }
        SkillButtonsHoverText.HoverText(toSend);
        hoverBlockActive = true;
    }
示例#4
0
 public void OnPointerExit(PointerEventData eventData)
 {
     hovering         = false;
     hoverBlockActive = false;
     SkillButtonsHoverText.StopHovering();
 }
示例#5
0
 private void StopHoverText()
 {
     hovering         = false;
     hoverBlockActive = false;
     SkillButtonsHoverText.StopHovering();
 }