Exemplo n.º 1
0
        IEnumerator <float> OrbRoutine(ManaOrb orb)
        {
            orb.SetIsPickedUp(true);
            yield return(Timing.WaitForSeconds(0.5f));

            if (orb != null)
            {
                orb.SetIsPickedUp(false);
            }
        }
Exemplo n.º 2
0
 protected virtual void FixedUpdate()
 {
     Util.Utilities.ClearArray(manaOrbs, manaOrbsCount);
     manaOrbsCount = Physics.OverlapSphereNonAlloc(transform.position, manaOrbRadius, manaOrbs, manaOrbLayerMask);
     for (int i = 0; i < manaOrbsCount; i++)
     {
         ManaOrb orb = manaOrbs[i].GetComponent <ManaOrb>();
         if (orb != null && CurrentMana + orb.GetAmount() <= Stats.MaxMana)
         {
             orb.PickUp(this);
         }
     }
 }