Пример #1
0
 public virtual void Shoot(GameObject projectile, float fireRate)
 {
     if (es.Timer(fireRate))
     {
         Instantiate(projectile, transform.position, transform.rotation);
     }
 }
Пример #2
0
    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;
        }
    }