예제 #1
0
 public static void AllItemAppraised(ItemInventory inv)
 {
     foreach (var item in inv.toArray())
     {
         GameController.DungeonInformation.updateItemDetectionLevel(item.GetType(),ItemBasis.DetectionLevel.CORRECT);
         var hasinv = item as IHasInventoryItem;
         if (hasinv != null) AllItemAppraised(hasinv.getInventory());
     }
 }
예제 #2
0
 public static void removeAllCommodities(ItemInventory inventory)
 {
     foreach (var item in inventory.toArray()) {
         var hasinv = item as IHasInventoryItem;
         if (hasinv != null) removeAllCommodities(hasinv.getInventory());
     }
     inventory.removeAll(item => item.IsCommodity);
 }
예제 #3
0
 public void init(ItemInventory target)
 {
     TargetInventory = target;
     Items = target.toArray();//WindowOwner.Parameter.Inventory.toArray();
     //if (Items.Length == 0) return;
     WindowText[,] itemname = new WindowText[Window.RowSize, 1];
     for (int i = 0; i < itemname.Length; i++)
     {
         itemname[i, 0] = new WindowText(SelectableWindow.EOL, Window.TextAreaPosition + new Vector2(10, WindowConfigure.fontScale(scale * i)));
         itemname[i, 0].TextAreaSize = new Vector2(Window.TextAreaSize.x - WindowConfigure.fontScale(1.25f), WindowConfigure.fontScale(scale));
     }
     Window.setText(itemname);
     MaxPageNum = (int)Mathf.Ceil(Items.Length / (float)Window.RowSize);
     //Debug.Log(MaxPageNum);
     CurrentPageNum = 0;
     setOnePageTexts();
 }