Ejemplo n.º 1
0
 protected override void OnActionEvent()
 {
     Debug.Log("ActionEvent Running");
     if (readyToShoot)
     {
         fireMethod.fire(projectile, transform.position, this.currentStateMachine.enemy, spread);
         disableShooting();
         Invoke("enableShooting", shotDelay);
         Exit();
     }
 }
Ejemplo n.º 2
0
 public void fire()
 {
     if (canFire)
     {
         if (cooldownDone)
         {
             Vector3 spawnPos = projectileBone.transform.position;
             if (spawnPos == null)
             {
                 spawnPos = transform.position;
             }
             firemethod.fire(projectile, spawnPos, CurrentCombatant, spread);
             cooldownDone = false;
             Invoke("fireRateCooldownDone", fireRate);
             muzzleFlash();
         }
     }
 }