15 lines
401 B
C#
15 lines
401 B
C#
using GeometryTD.Definition;
|
|
|
|
namespace GeometryTD.CustomComponent
|
|
{
|
|
internal sealed class EnemiesClearedPhaseEndCondition : IPhaseEndCondition
|
|
{
|
|
public PhaseEndType EndType => PhaseEndType.EnemiesCleared;
|
|
|
|
public bool ShouldExit(in PhaseEndConditionContext context)
|
|
{
|
|
return context.IsPhaseSpawnCompleted && context.AliveEnemyCount <= 0;
|
|
}
|
|
}
|
|
}
|