Improve game over conditions

This commit is contained in:
2023-09-03 15:57:21 -07:00
parent 23f20f08e0
commit c8d0eefd7e
3 changed files with 43 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ public partial class Player1 : Character
{
CanShoot = true;
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
_gameManager.SetP1GameOver(false);
}
public override void _PhysicsProcess(double delta)
@@ -94,7 +95,7 @@ public partial class Player1 : Character
if (_gameManager._p1Characters.Count == 0)
{
GD.Print("Game over for P1");
_gameManager.P1GameOver = true;
_gameManager.SetP1GameOver(true);
}
}
}