示例#1
0
    private void ShowCharInfoTake()
    {
        PrepCharacterEntry entry = charList.GetEntry();

        tCharName.text = entry.entryName.text;
        //portrait.sprite = entry.icon.sprite;
        for (int i = 0; i < InventoryContainer.INVENTORY_SIZE; i++)
        {
            InventoryTuple tuple = entry.invCon.GetTuple(i);
            tInventory[i].text = (!string.IsNullOrEmpty(tuple.uuid)) ? tuple.entryName : "-NONE-";
        }
    }
示例#2
0
    private void ShowItemInfo()
    {
        PrepCharacterEntry entry = charList.GetEntry();
        InventoryTuple     tuple = null;

        if (currentMode == State.STORE)
        {
            tuple = itemList.GetEntry().tuple;
        }
        else if (convoy.GetEntry())
        {
            tuple = convoy.GetEntry().tuple;
        }

        if (!entry || tuple == null || string.IsNullOrEmpty(tuple.uuid))
        {
            itemName.text   = "";
            itemIcon.sprite = null;

            pwrText.text   = "Pwr:  ";
            rangeText.text = "Range:  ";
            hitText.text   = "Hit:  ";
            critText.text  = "Crit:  ";
            reqText.text   = "Req:  ";
            return;
        }

        itemName.text   = tuple.entryName;
        itemIcon.sprite = tuple.icon;

        pwrText.text   = "Pwr:  " + tuple.power.ToString();
        rangeText.text = "Range:  " + tuple.range.ToString();
        hitText.text   = "Hit:  " + tuple.hitRate.ToString();
        critText.text  = "Crit:  " + tuple.critRate.ToString();
        reqText.text   = "Req:  " + tuple.skillReq.ToString();

        if (currentMode == State.TAKE)
        {
            ShowCharInfoTake();
        }
    }
示例#3
0
    public void GenerateList()
    {
        currentMode = State.CHAR;
        charListView.SetActive(true);
        inventoryView.SetActive(false);
        storeView.SetActive(false);
        convoyView.SetActive(false);
        if (charList == null)
        {
            charList = new EntryList <PrepCharacterEntry>(visibleSize);
        }
        charList.ResetList();

        for (int i = 0; i < prepList.values.Count; i++)
        {
            Transform          t     = Instantiate(charEntryPrefab, charListParent.transform);
            PrepCharacterEntry entry = charList.CreateEntry(t);
            entry.FillData(playerData.stats[prepList.values[i].index], playerData.inventory[prepList.values[i].index], prepList.values[i]);
        }
        ShowCharInfo();
        charEntryPrefab.gameObject.SetActive(false);
        convoy.Setup();
    }