Beispiel #1
0
    private bool CheckIndexToTool(int index, ToolItemSO tool)
    {
        if (index == GetToolSlotIndex(tool.GetToolType))
        {
            return(true);
        }

        return(false);
    }
Beispiel #2
0
    public float GetGatheringSpeedFromTool(ToolType tool)
    {
        toolCache = null;

        if (toolSlots[GetToolSlotIndex(tool)] == null)
        {
            return(1);
        }

        toolCache = toolSlots[GetToolSlotIndex(tool)].item as ToolItemSO;

        return(1 + (toolCache.GetSpeedPrecentage) / 100);
        // GetTier
    }
Beispiel #3
0
    // do unequip function to the outside will get itemslot and REMOVE THE FUNCTION



    #region Equips
    public void ResetEquip()
    {
        if (gearSlots != null && toolSlots != null)
        {
            for (int i = 0; i < gearSlots.Length; i++)
            {
                if (gearSlots[i] != null)
                {
                    UnEquipItem(gearSlots[i]);
                }

                toolSlots[i] = null;
            }
        }


        inventory = Inventory.GetInstance;
        gearSlots = inventory.GetInventoryFromDictionary(2);
        toolSlots = inventory.GetInventoryFromDictionary(3);


        if (toolsActive == null)
        {
            toolsActive = new bool[toolSlots.Length];
        }

        for (int i = 0; i < toolsActive.Length; i++)
        {
            toolsActive[i] = true;
        }


        equipSlotCache = null;
        gearCache      = null;
        toolCache      = null;
    }