Пример #1
0
        public void OnPointerExit(PointerEventData eventData)
        {
            if (this.enabled)
            {
                if (this.targetImage != null)
                {
                    this.targetImage.overrideSprite = null;
                }

                UIDurabilityTooltip.Hide();
            }
        }
Пример #2
0
        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();
            }
        }
Пример #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>();
        }
Пример #4
0
 protected override void OnDestroy()
 {
     mInstance = null;
 }
Пример #5
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>();
        }
Пример #6
0
 protected override void OnDestroy()
 {
     mInstance = null;
 }