Beispiel #1
0
    public void Clear()
    {
        name.text        = "";
        grade.color      = UIItem.GetGradeColor(Item.Grade.Low);
        description.text = "";
        icon.color       = new Color(1.0f, 1.0f, 1.0f, 0.0f);

        for (int i = 0; i < (int)Action.Max; i++)
        {
            buttons[i].gameObject.SetActive(false);
            actions[i] = null;
        }
    }
Beispiel #2
0
 public void SetItemIcon(UIItem item)
 {
     grade.color = UIItem.GetGradeColor(item.data.grade);
     icon.color  = Color.white;
     icon.sprite = ResourceManager.Instance.Load <Sprite>(item.data.meta.sprite_path);
 }
Beispiel #3
0
    public IEnumerator Open()
    {
        if (Inventory.MAX_SLOT_COUNT <= GameManager.Instance.player.inventory.count)
        {
            yield return(GameManager.Instance.ui_textbox.Write(GameText.GetText("ERROR/INVENTORY_FULL"), false));

            yield break;
        }

        touch_input.touch_collider.enabled = false;
        lock_icon.gameObject.SetActive(false);
        AudioManager.Instance.Play(AudioManager.BOX_OPEN);
        StartCoroutine(Util.UITween.Overlap(close, open, time));

        Item item = room.item.CreateInstance();

        GameManager.Instance.player.inventory.Add(item);
        yield return(GameManager.Instance.ui_textbox.Write(GameText.GetText("DUNGEON/HAVE_ITEM", "You", "<color=#" + ColorUtility.ToHtmlStringRGB(UIItem.GetGradeColor(item.grade)) + ">" + room.item.name + "</color>"), false));

        ProgressManager.Instance.Update(ProgressType.CollectItem, "", 1);
        room.item = null;
        gameObject.SetActive(false);
    }