Exemple #1
0
        public void Show(MonoBehaviour p_caller, AttributeTooltip.TooltipType p_type, EPotionTarget p_attribute, Int32 p_currentIncrease, Vector3 p_position, Vector3 p_offset, Character p_character, DummyCharacter p_dummy)
        {
            m_tooltipCaller = p_caller;
            m_AttributeTooltip.Fill(p_type, p_attribute, p_currentIncrease, p_character, p_dummy);
            m_position = UICamera.currentCamera.WorldToScreenPoint(p_position);
            Single p_xOffset = m_tooltipOffset + 0.5f * m_AttributeTooltip.Scale.x + p_offset.x;
            Single p_yOffset = m_tooltipOffset + p_offset.y;

            AdjustAlignment(p_xOffset, p_yOffset, m_AttributeTooltip.Scale.x + p_offset.x, m_AttributeTooltip.Scale.y, EVerticalAlignmentType.MIDDLE);
            AdjustPosition();
            m_AttributeTooltip.Show();
        }
 private void ShowTooltip(Boolean p_show)
 {
     if (p_show)
     {
         Vector3 position = gameObject.transform.position;
         AttributeTooltip.TooltipType p_type = (m_buttonType != ButtonType.PLUS) ? AttributeTooltip.TooltipType.CURRENT_EFFECT_PREV : AttributeTooltip.TooltipType.CURRENT_EFFECT_NEXT;
         TooltipManager.Instance.Show(this, p_type, m_attribute, m_baseValue + m_currentIncrease, position, m_offset, m_character, m_dummy);
     }
     else
     {
         TooltipManager.Instance.Hide(this);
     }
     m_tooltipVisible = p_show;
 }