private bool CheckIndexToTool(int index, ToolItemSO tool) { if (index == GetToolSlotIndex(tool.GetToolType)) { return(true); } return(false); }
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 }
// 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; }