Esempio n. 1
0
 /// <summary>
 /// Use the page currently set as selected. Requires a SpellCharge to use.
 /// </summary>
 /// <param name="_type">Which type of attack to use on the given page.</param>
 /// <returns>The AbstractAttack reference.</returns>
 public AbstractAttack UseCurrentPage(Page.Type _type)
 {
     if (!m_SelectedPage.OnCooldown())
     {
         if (m_spellCharges.UseCharge(GetRefreshRate()))
         {
             return(m_SelectedPage.UsePage(_type));
         }
     }
     return(null);
 }
Esempio n. 2
0
 /// <summary>
 /// Start the incantation. Requires a spell charge.
 /// </summary>
 public override IEnumerator StartAttack()
 {
     if (m_spellChargeReference.UseCharge())
     {
         yield return(StartCoroutine(base.StartAttack()));
     }
     else
     {
         yield return(null);
     }
 }