Exemplo n.º 1
0
 // 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);
     }
 }
Exemplo n.º 2
0
    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;
    }