public void OnPointerExit(PointerEventData eventData)
        {
            if (this.enabled)
            {
                if (this.targetImage != null)
                {
                    this.targetImage.overrideSprite = null;
                }

                UIDurabilityTooltip.Hide();
            }
        }
        public void OnPointerEnter(PointerEventData eventData)
        {
            if (this.enabled)
            {
                if (this.targetImage != null)
                {
                    this.targetImage.overrideSprite = this.hoverSprite;
                }

                UIDurabilityTooltip.SetDurability(Random.Range(0, 100).ToString());
                UIDurabilityTooltip.Show();
            }
        }
Beispiel #3
0
        protected override void Awake()
        {
            mInstance = this;

            // Get the rect transform
            this.m_Rect = (this.transform as RectTransform);

            // Get the canvas
            this.m_Canvas = UIUtility.FindInParents <Canvas>(this.gameObject);

            // Get the canvas group
            this.m_CanvasGroup = this.gameObject.GetComponent <CanvasGroup>();
        }
 protected override void OnDestroy()
 {
     mInstance = null;
 }
        protected override void Awake()
        {
            mInstance = this;

            // Get the rect transform
            this.m_Rect = (this.transform as RectTransform);

            // Get the canvas
            this.m_Canvas = UIUtility.FindInParents<Canvas>(this.gameObject);

            // Get the canvas group
            this.m_CanvasGroup = this.gameObject.GetComponent<CanvasGroup>();
        }
Beispiel #6
0
 protected override void OnDestroy()
 {
     mInstance = null;
 }