public void Show(MonoBehaviour p_caller, BaseItem p_item, IInventory p_inventory, Vector3 p_position, Vector3 p_offset) { m_tooltipCaller = p_caller; m_itemTooltip.Fill(p_item, null, null, p_inventory); m_position = UICamera.currentCamera.WorldToScreenPoint(p_position); Single p_xOffset = m_tooltipOffset + 0.5f * m_itemTooltip.Scale.x + p_offset.x; Single p_yOffset = m_tooltipOffset + p_offset.y; AdjustAlignment(p_xOffset, p_yOffset, m_itemTooltip.Scale.x + p_offset.x, m_itemTooltip.Scale.y, EVerticalAlignmentType.MIDDLE); AdjustPosition(); m_itemTooltip.Show(); }
private void Update() { if (m_showCompare && Time.time > m_showTime + m_compareDelay) { m_showCompare = false; m_compareTooltip.Show(); m_itemTooltip.ShowComparison(); m_compareTooltip.ShowComparison(); if (m_showCompareSecondary) { m_compareSecondaryTooltip.Show(); m_compareSecondaryTooltip.ShowComparison(); } } }