the scarlet police still have me at gunpoint
This commit is contained in:
parent
2ca43ec836
commit
980deb5d09
6 changed files with 1467 additions and 39 deletions
|
|
@ -1,13 +1,15 @@
|
|||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class AbilityHotbarIcon : MonoBehaviour
|
||||
public class AbilityHotbarIcon : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
[SerializeField] private Transform cooldownBar;
|
||||
[SerializeField] private TextMeshProUGUI text;
|
||||
private bool onCooldown;
|
||||
private PlayerAbility thisAbility;
|
||||
[SerializeField] private FloatingAbilityInfo infoUI;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
|
@ -34,4 +36,15 @@ public class AbilityHotbarIcon : MonoBehaviour
|
|||
thisAbility = ability;
|
||||
text.text = thisAbility.abilityName;
|
||||
}
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
infoUI.gameObject.SetActive(true);
|
||||
infoUI.ShowInfo(thisAbility);
|
||||
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
infoUI.gameObject.SetActive(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue