public void throwFireball() { // _anim.SetBool("fireball", _canCast); Wait(3f); if (_canCast) { _fire.Cast(_dir); _canCast = false; StartCoroutine("FireballCooldown"); } }
void CastProjectile(int spell, Vector2 direction) { if (_projectileCld <= 0.0f) { switch (spell) { case 1: _fireball.Cast(direction); break; case 2: _wind.Cast(direction); break; } _projectileCld = c_projectileCld; _flameThrowerCld = c_projectileCld; } }
IEnumerator beforeAnim() { yield return(new WaitForSeconds(0.7f)); _fire.Cast(_dir); }