Update stuff
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class AreaExit : Node3D
|
||||
public partial class AreaExit : Area3D
|
||||
{
|
||||
[Export]
|
||||
private int _levelIndex;
|
||||
@@ -22,6 +22,9 @@ public partial class AreaExit : Node3D
|
||||
GD.Print($"Exit reached by {character.Name}");
|
||||
|
||||
if (!_gameManager.Players.Any(x => x.CharactersLeftOnStage.Any()))
|
||||
{
|
||||
QueueFree();
|
||||
_gameManager.OnLevelClear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user