added Item changing Sprite when hovering over Slot in Shop or Inventory
This commit is contained in:
parent
fe63511825
commit
24fa26ddb2
11 changed files with 46 additions and 23 deletions
|
|
@ -6,23 +6,23 @@ public class HoverManager : MonoBehaviour {
|
|||
public TextMeshProUGUI descriptionText;
|
||||
public RectTransform descriptionHoverBackground;
|
||||
|
||||
public static Action<string, Vector2> onMouseHover;
|
||||
public static Action<string, Vector2> onMouseHoverDescription;
|
||||
public static Action onMouseExit;
|
||||
|
||||
private void OnEnable() {
|
||||
onMouseHover += ShowDescription;
|
||||
onMouseHoverDescription += ShowDescription;
|
||||
onMouseExit += HideDescription;
|
||||
}
|
||||
|
||||
private void OnDisable() {
|
||||
onMouseHover -= ShowDescription;
|
||||
onMouseHoverDescription -= ShowDescription;
|
||||
onMouseExit -= HideDescription;
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
HideDescription();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the description Text at the mouse position
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue