예제 #1
0
    public IEnumerable <IList <InventoryItem> > GetItems(InventoryUI.Page page)
    {
        switch (page)
        {
        case InventoryUI.Page.Weapons:
            foreach (var it in mWeapons)
            {
                yield return(it.Value);
            }
            break;

        case InventoryUI.Page.Throwables:
            foreach (var it in mThrowables)
            {
                yield return(it.Value);
            }
            break;

        case InventoryUI.Page.Consumables:
            foreach (var it in mConsumables)
            {
                yield return(it.Value);
            }
            break;
        }
    }
    public IEnumerable <InventoryItemSpec> GetItems(InventoryUI.Page page)
    {
        switch (page)
        {
        case InventoryUI.Page.Weapons:
            foreach (var it in Weapons)
            {
                yield return(it);
            }
            break;

        case InventoryUI.Page.Throwables:
            foreach (var it in Throwables)
            {
                yield return(it);
            }
            break;

        case InventoryUI.Page.Consumables:
            foreach (var it in Consumables)
            {
                yield return(it);
            }
            break;
        }
    }
예제 #3
0
 public void SetPage(InventoryUI.Page page)
 {
     if (mPage != page)
     {
         mPage = page;
         Refresh(true);
         UpdateUI();
     }
 }