Example #1
0
    /*
     * public void Awake()
     * {
     *  tip = FindObjectOfType<ToolTip>();
     * }
     * //*/

    /*
     * public void AddItem(Item newItem)
     * {
     *  item = newItem;
     *
     *  icon.sprite = item.icon;
     *
     *  if (model == null) {
     *      model = Instantiate(item.model, modelTransform.transform);
     *      model.transform.localPosition = new Vector3(0 + item.itemXOffset, 0 + item.itemYOffset, 0);
     *      model.layer = 5;
     *      model.transform.localScale = new Vector3(item.itemScale, item.itemScale, item.itemScale);
     *      if (model.GetComponent<Rigidbody>() != null) {
     *          model.GetComponent<Rigidbody>().useGravity = false;
     *      }
     *  }
     *  icon.enabled = true;
     *  //removeButton.interactable = true;
     *
     *
     * }
     * //*/

    /*
     * public void ClearSlot()
     * {
     *  item = null;
     *  icon.sprite = null;
     *  icon.enabled = false;
     *  Destroy(model);
     *  model = null;
     *  //removeButton.interactable = false;
     * }
     * //*/
    /*
     *
     * public void OnRemoveButton()
     * {
     *  //Inventory.instance.Remove(item);
     * }
     * //*/

    /*
     * public void UseItem()
     * {
     *  if(item != null && !tip.gameObject.activeSelf)
     *  {
     *      tip.ToggleMe(item, transform, this);
     *      tip.gameObject.SetActive(true);
     *      Debug.Log("Selected");
     *  }
     * }
     * //*/

    public void OnPointerEnter(PointerEventData eventData)
    {
//Tooltip Handling
        iTooltip.gameObject.SetActive(true);
        //iTooltip.transform.position = new Vector3(transform.position.x + tooltipOffset.x, transform.position.y + tooltipOffset.y, transform.position.z);
        iTooltip.Unpack(iItem, transform.position);
        mouseOver = true;
    }
Example #2
0
 public void OnPointerEnter(PointerEventData evd)
 {
     arrow.SetActive(true);
     itemName.color     = colorMOver;
     itemQuantity.color = colorMOver;
     //Tooltip
     iTooltip.gameObject.SetActive(true);
     iTooltip.Unpack(iItem, transform.position);
 }