public virtual void Shoot(GameObject projectile, float fireRate) { if (es.Timer(fireRate)) { Instantiate(projectile, transform.position, transform.rotation); } }
void Update() { switch (State) { case STATE.Idle: break; case STATE.spawning: if (enemyCount < enemyLimit) { CreateEnemy(es.Timer(distanceBetween)); } else { State = STATE.Idle; hordaButton.SetActive(true); } break; } }