add: escape key coutns as failed level

This commit is contained in:
KOSMOGOR
2025-05-08 20:45:56 +03:00
parent ed9765a40a
commit 74dadfed86
+6
View File
@@ -33,6 +33,12 @@ public class LevelController : MonoBehaviour
if (aliveEnemies.All(enemy => enemy == null)) {
GameController.i.OnLevelClear(SceneManager.GetActiveScene().name, timeSpent);
GameController.i.LoadDeployScene();
return;
}
if (Input.GetKeyDown(KeyCode.Escape)) {
GameController.i.OnLevelFailed(SceneManager.GetActiveScene().name, timeSpent, aliveEnemies);
GameController.i.LoadDeployScene();
return;
}
timeSpent += Time.deltaTime;
}