21 lines
499 B
C#
21 lines
499 B
C#
using System.Collections.Generic;
|
|
using Framework;
|
|
using Gameplay.Level;
|
|
using Framework.Condition;
|
|
|
|
|
|
/// <summary>
|
|
/// 关卡是否通关
|
|
/// </summary>
|
|
public class ConditionLevelPass : ICondition
|
|
{
|
|
public EventManager.EventName SignalName => EventManager.EventName.LevelInfoChanged;
|
|
|
|
public bool Check(List<float> args)
|
|
{
|
|
var id = (int)args[0];
|
|
|
|
var levelInfo = LevelManager.Instance.GetLevelInfoByID(id);
|
|
return levelInfo != null && levelInfo.HasPass;
|
|
}
|
|
} |