// Use this for initialization void Start() { enemyColors = new List <float>(); score = GameObject.FindObjectOfType <Score>(); enemyCounter = 0; enemiesAllowed = 0; AmmoManager.UpdateAmmo(5, 5); }
private void Update() { if (enemyCounter <= 0) { score.ResetTimer(); enemyColors.Clear(); enemiesAllowed++; if (enemiesAllowed > 1) { AmmoManager.UpdateAmmo(AmmoManager.minAmmo + 1, AmmoManager.minAmmo * 2); } if (enemiesAllowed > transform.childCount) { enemiesAllowed = 1; AmmoManager.UpdateAmmo(5, 5); } Spawn(); //print("(" + AmmoManager.minAmmo + ", " + AmmoManager.maxAmmo + ")"); } }