예제 #1
0
    // doesn't do header text
    public void Populate(bool sellActive = false)
    {
        gp.Populate();

        buyList.Populate(data.items);
        if (sellActive)
        {
            sellList.gameObject.SetActive(true);
            inventoryList.gameObject.SetActive(false);
            sellList.Populate(Global.Instance().Data.Inventory);
        }
        else
        {
            sellList.gameObject.SetActive(false);
            inventoryList.gameObject.SetActive(true);
            inventoryList.Populate(Global.Instance().Data.Inventory);
        }
    }
예제 #2
0
    public void Populate(bool healed = false)
    {
        var cost = CalculateCost();

        if (healed)
        {
            headerText.text = $"You're all set.";
        }
        else
        {
            headerText.text = $"It'll cost {cost} GP to spend the night.";
        }

        gp.Populate();

        partyCells.Populate(Global.Instance().Party, (obj, unit) => {
            var cell = obj.GetComponent <UnitCellView>();
            cell.Populate(unit);
        });
    }