- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using UnityEngine.UI;
- public class SlotController : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
- {
-
- public Item item;
- [HideInInspector]
- public Image imageComponent;
- private Image informationPanel;
- private Text infoText;
- void Start()
- {
- imageComponent = GetComponent<Image>();
- informationPanel = GameObject.Find("Information Panel").GetComponent<Image>();
- infoText = GameObject.Find("InfoText").GetComponent<Text>();
- }
- public void OnPointerEnter(PointerEventData pointerEventData)
- {
-
- informationPanel.color = new Color(1, 1, 1, 1);
- infoText.text = "You recall this memory by " + item.name + " where " + item.description;
- }
-
- public void OnPointerExit(PointerEventData pointerEventData)
- {
-
- informationPanel.color = new Color(1, 1, 1, 0);
- infoText.text = "";
- }
- }