// Functions for animation events, only apply when currently attacking, because the animations can be shared with other actions
 public void FireWeapon()
 {
     if (currentlyAttacking)
     {
         // Debug.Log("Firing weapon");
         weapon.Fire(gameObject);
     }
 }
    IEnumerator CastWeapon(CasterWeapon weapon)
    {
        //weapon.PlayWindupParticles();
        yield return(new WaitForSeconds(weapon.animationTime));

        weapon.Fire(gameObject);
        yield return(new WaitForSeconds(weapon.cooldown));

        currentlyAttacking = false;
        waitTime          += weapon.cooldown + actionCooldownTime;
    }