public void _UseBattery() { if (inv.collectables[0] <= 0 || flashlightScript.batteryLife >= flashlightScript.maxLife || inv.items[0] == false) { return; } inv.collectables[0]--; data.amount = inv.collectables[0]; data.amountText.text = "<color=#128CE3FF>Amount:</color> " + data.amount + "x"; if (inv.collectables[0] <= 0) { data.gameObject.SetActive(false); } invSystem.CheckItemsCount(); flashlightScript.UpdateBattery(); }