Verlieren und Gewinnen Screen
This commit is contained in:
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user