Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 public static float getIsAConfidence(GameObject go, Noun n, Observer perspective)
 {
     return(n.IsA(go, perspective));
 }
Ejemplo n.º 3
0
 public static bool IsA(Noun n1, Noun n2, Observer perspective)
 {
     return(n1.IsA(n2));
 }