public int GetItemCount(Noun itemType, InventorySlotType slotType, Observer perspective) { int stack = 0; if (slotType == InventorySlotType.NORMAL) { foreach (InventoryItemData iid in items.Values) { if (itemType.IsA(iid.EquipmentInstance.gameObject, perspective) > 0f) { stack += iid.EquipmentInstance.CurrentStack; } } return(stack); } foreach (EquipmentSlot es in slotData) { if (es.SlotType == slotType) { InventoryItemData iid = GetItem(es.coordinate); if (itemType.IsA(iid.EquipmentInstance.gameObject, perspective) > 0f) { stack += iid.EquipmentInstance.CurrentStack; } } } return(stack); }
public static float getIsAConfidence(GameObject go, Noun n, Observer perspective) { return(n.IsA(go, perspective)); }
public static bool IsA(Noun n1, Noun n2, Observer perspective) { return(n1.IsA(n2)); }