Ejemplo n.º 1
0
    public void OnPointerExit(PointerEventData eventData)
    {
        InvUIManager descript = FindObjectOfType <InvUIManager>();

        descript.ChangeDisplayInfo("", "", "", "");
        descript.currItemShell = null;
    }
Ejemplo n.º 2
0
    public void OnPointerEnter(PointerEventData eventData) // shows item description
    {
        //Gets display info from item cursor hovers over

        string       title          = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.itemName;
        string       body           = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.itemDescription;
        string       attribute      = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.trait;
        Sprite       icon_attribute = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.traitIcon;
        string       rarity         = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.rarity;
        string       avgPrice       = eventData.pointerCurrentRaycast.gameObject.GetComponentInParent <InvItemShell>().item.currentAverageValue.ToString();
        InvUIManager descript       = FindObjectOfType <InvUIManager>();

        descript.ChangeDisplayInfo(title, body, attribute, avgPrice, rarity, icon_attribute);
        descript.currItemShell = this;
    }