Set game over for character condition
This commit is contained in:
@@ -82,8 +82,19 @@ public partial class Player1 : Character
|
||||
CanShoot = true;
|
||||
}
|
||||
|
||||
private void HitDebug()
|
||||
{
|
||||
var node = new Node3D();
|
||||
OnHit(node);
|
||||
}
|
||||
|
||||
private void OnHit(Node3D node)
|
||||
{
|
||||
QueueFree();
|
||||
_gameManager.RemoveP1Character();
|
||||
if (_gameManager._p1Characters.Count == 0)
|
||||
{
|
||||
GD.Print("Game over for P1");
|
||||
_gameManager.P1GameOver = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user