protected override void OnActionEvent() { Debug.Log("ActionEvent Running"); if (readyToShoot) { fireMethod.fire(projectile, transform.position, this.currentStateMachine.enemy, spread); disableShooting(); Invoke("enableShooting", shotDelay); Exit(); } }
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(); } } }