public void GainMana(float amount) { MageStatus mage = FindObjectOfType <MageStatus>(); mage.ResetWaitTime(); mage.ManaRegen(amount); }
protected virtual void Update() { if (isStart) { timer += Time.deltaTime; mageStatus.ManaRegen(.2f); if (timer >= 10f) { isStart = false; Stop(); timer = 0; } } else { if (Input.GetKeyDown(KeyCode.Q) && mageStatus.energy >= 100) { isStart = true; Fire(); } } }