//void SetTimer() //{ // timeLeft -= Time.deltaTime; // uiPlayer.SetTimer(timeLeft); // if (timeLeft < 0) // { // GameOver(); // } //} void AddDifficulty() { addDifficultyTimer -= Time.deltaTime; uiPlayer.SetTimer(addDifficultyTimer); if (addDifficultyTimer <= 0) { uiPlayer.LevelUp(); addDifficultyTimer = nextDifficultyDelay; if (enemyTotal < 15) { SpawnAEnemy(); SpawnAEnemy(); enemyTotal += 2; } aiPlayer.AddSpeed(4f); } }