28 lines
821 B
C#
28 lines
821 B
C#
//////////////////////////////////////////////////////////////////////////
|
||
//
|
||
// 文件:Assets/Code/Scripts/Gameplay/Net/Actor/Unlock/UnlockLevelPass.cs
|
||
// 作者:Xoen Xie
|
||
// 时间:2023/08/21
|
||
// 描述:解锁条件 - 关卡是否通关
|
||
// 说明:
|
||
//
|
||
//////////////////////////////////////////////////////////////////////////
|
||
|
||
namespace Gameplay.Net
|
||
{
|
||
public class UnlockLevelPass : IUnlock
|
||
{
|
||
public uint Check(cfg.ActorCfg.DataUnlock cfgData)
|
||
{
|
||
uint id = UnlockManager.GetUnlockParam(cfgData, cfg.ActorCfg.UnlockParam.LevelID);
|
||
|
||
var isPassed = Actor.Instance.Level.IsLevelPassed(id);
|
||
if (!isPassed)
|
||
{
|
||
return (uint)NLDPB.OpResult.LevelNotPassed;
|
||
}
|
||
|
||
return (uint)NLDPB.OpResult.Ok;
|
||
}
|
||
}
|
||
} |