Exemplo n.º 1
0
    public void GainMana(float amount)
    {
        MageStatus mage = FindObjectOfType <MageStatus>();

        mage.ResetWaitTime();
        mage.ManaRegen(amount);
    }
Exemplo n.º 2
0
 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();
         }
     }
 }