20 lines
476 B
C#
20 lines
476 B
C#
using Framework;
|
|
using Gameplay.Level;
|
|
using Framework.Condition;
|
|
|
|
|
|
/// <summary>
|
|
/// 关卡是否通关
|
|
/// </summary>
|
|
public class ConditionLevelPass : ICondition
|
|
{
|
|
public EventManager.EventName SignalName => EventManager.EventName.LevelInfoChanged;
|
|
|
|
public bool Check(cfg.DataCondition cfgData)
|
|
{
|
|
var id = cfgData.Param1;
|
|
|
|
var levelInfo = LevelManager.Instance.GetLevelInfoByID(id);
|
|
return levelInfo != null && levelInfo.HasPass;
|
|
}
|
|
} |