Exemple #1
0
    public void Update(EnemyHandler handler, float gameTime, float delta)
    {
        time += delta;
        if (EnemyUtils.CheckSpawnNeeded(data, gameTime, time, count))
        {
            // Ask the enemy handler to create new enemies
            time = 0f;
            int createEnemies = 1;
            if (count == 0)
            {
                createEnemies = data.startCount;
            }

            count += handler.SpawnEnemies(data, createEnemies, id);
        }
    }