protected override void Gathering() { base.Gathering(); // Enquanto coleta if (gathering) { if (currentTime <= 1f) { currentTime += Time.deltaTime; } else { amount -= 1; currentTime = 0f; // Reduz o tamanho da nuvem a medida que o jogador coleta emission0.rateOverTime = AmountPercent() * rate0 + .3f; emission1.rateOverTime = AmountPercent() * rate1 + .3f; // Se acabou o objeto é desativado if (amount < 0) { gathering = false; gameObject.SetActive(false); } else { // Adiciona ao inventário inventory.AddRock(rockType, amount); } } } }