Verlieren und Gewinnen Screen

This commit is contained in:
Simon Lübeß
2024-04-08 21:24:13 +02:00
parent defd359852
commit 9e59e1980c
4 changed files with 1541 additions and 14 deletions

View File

@ -153,15 +153,27 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
}
}
[SerializeField]
private bool _won;
public bool Won => _won;
[SerializeField]
private bool _lost;
public bool Lost => _lost;
private void EndGame(EndGameCondition endGameCondition)
{
if (endGameCondition.IsWin())
{
Debug.Log("You won!");
_won = true;
}
else if (endGameCondition.IsLose())
{
Debug.Log("You lost!");
_lost = true;
}
Debug.Log(endGameCondition.GetEndGameMessage());