public void ECloseButton() { //GameManager.instance.playerC.GetComponent<CharacterSwapping>().currentCharacter.GetComponent<Health>().GetComponent<PlayerController>().removeEquipmentItemFromPlayer(GetEItem()); GameManager.instance.RemoveEquipmentItem(GetEItem()); Debug.Log("removing"); if (GameManager.instance.equipmentItems.Contains(GetEItem())) { Debug.Log("not completed removed"); } equipItem = GetEItem(); if (equipItem != null) { //show tooltip toolT.ShowTooltip(); toolT.UpdateTooltip(GetDetailText(equipItem)); RectTransformUtility.ScreenPointToLocalPointInRectangle(GameObject.Find("Canvas").transform as RectTransform, Input.mousePosition, null, out position); toolT.SetPosition(position); } else { //hide tooptip toolT.HideTooltip(); toolT.UpdateTooltip(""); } }
public void OnPointerExit(PointerEventData eventData) { if (thisItem != null) { Debug.Log("EXIT " + thisItem.itemName + " SLOT"); tooltips.HideTooltip(); tooltips.UpdateTooltip("");//CLEAR } }
public void CloseButton() { GameManager.instance.RemoveItem(GetThisItem()); thisItem = GetThisItem(); if (thisItem != null) { //show tooltip tooltip.ShowTooltip(); tooltip.UpdateTooltip(GetDetailText(thisItem)); RectTransformUtility.ScreenPointToLocalPointInRectangle(GameObject.Find("Canvas").transform as RectTransform, Input.mousePosition, null, out position); tooltip.SetPosition(position); } else { //hide tooptip tooltip.HideTooltip(); tooltip.UpdateTooltip(""); } }
public void OnPointerExit(PointerEventData eventData) { tooltip.HideTooltip(); tooltip.UpdateTooltip(""); }