29 lines
955 B
C#
29 lines
955 B
C#
//////////////////////////////////////////////////////////////////////////
|
||
//
|
||
// 文件:Assets/Code/Scripts/Gameplay/Net/Actor/Unlock/UnlockLevelStar.cs
|
||
// 作者:Xoen Xie
|
||
// 时间:2023/08/21
|
||
// 描述:解锁条件 - 关卡获得星数量
|
||
// 说明:
|
||
//
|
||
//////////////////////////////////////////////////////////////////////////
|
||
|
||
namespace Gameplay.Net
|
||
{
|
||
public class UnlockLevelStar : IUnlock
|
||
{
|
||
public uint Check(cfg.ActorCfg.DataUnlock cfgData)
|
||
{
|
||
uint id = UnlockManager.GetUnlockParam(cfgData, cfg.ActorCfg.UnlockParam.LevelID);
|
||
uint star = UnlockManager.GetUnlockParam(cfgData, cfg.ActorCfg.UnlockParam.LevelStar);
|
||
|
||
var info = Actor.Instance.Level.GetLevelInfo(id);
|
||
if (info == null || info.star < star)
|
||
{
|
||
return (uint)NLDPB.OpResult.LevelStarInvalid;
|
||
}
|
||
|
||
return (uint)NLDPB.OpResult.Ok;
|
||
}
|
||
}
|
||
} |