2024-09-02 14:08:35 +08:00
|
|
|
|
using Gameplay;
|
2023-10-19 15:00:19 +08:00
|
|
|
|
using Gameplay.Level;
|
|
|
|
|
|
using Gameplay.Net;
|
|
|
|
|
|
using System.Collections.Generic;
|
2024-01-30 15:10:12 +08:00
|
|
|
|
using System.Linq;
|
2023-11-02 20:02:10 +08:00
|
|
|
|
using cfg.RedPoint;
|
2024-01-10 13:40:07 +08:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
2023-11-01 13:33:20 +08:00
|
|
|
|
using Framework;
|
|
|
|
|
|
using Framework.Condition;
|
2023-10-19 15:00:19 +08:00
|
|
|
|
using Debug = DebugUtil;
|
2024-01-29 16:30:26 +08:00
|
|
|
|
using System;
|
2024-08-28 12:17:53 +08:00
|
|
|
|
using cfg.LevelCfg;
|
2024-09-02 14:55:43 +08:00
|
|
|
|
using static MapData;
|
2023-10-19 15:00:19 +08:00
|
|
|
|
|
2024-09-02 14:08:35 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡信息
|
|
|
|
|
|
/// </summary>
|
2024-06-27 18:55:53 +08:00
|
|
|
|
public class LevelInfo : IRedPointTreeNode
|
2023-10-19 15:00:19 +08:00
|
|
|
|
{
|
2024-09-02 14:08:35 +08:00
|
|
|
|
#region 私有字段
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private LevelData levelData;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 地图数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private MapData mapData;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 服务器关卡数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private Gameplay.Net.LevelInfo serverData;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 章节索引
|
|
|
|
|
|
/// </summary>
|
2024-09-05 13:41:39 +08:00
|
|
|
|
private int chapterIndex = -1;
|
2024-09-02 14:08:35 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡索引
|
|
|
|
|
|
/// </summary>
|
2024-09-05 13:41:39 +08:00
|
|
|
|
private int levelIndex = -1;
|
2024-09-02 14:08:35 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 解锁条件id
|
|
|
|
|
|
/// </summary>
|
2024-08-13 16:04:49 +08:00
|
|
|
|
private int unLockConditionId;
|
2024-09-02 14:08:35 +08:00
|
|
|
|
#endregion
|
2024-08-13 16:04:49 +08:00
|
|
|
|
|
2023-10-19 15:00:19 +08:00
|
|
|
|
#region config
|
2024-09-02 14:08:35 +08:00
|
|
|
|
/// <summary>
|
2024-09-02 14:55:43 +08:00
|
|
|
|
/// 配置数据
|
2024-09-02 14:08:35 +08:00
|
|
|
|
/// </summary>
|
2024-09-02 18:51:47 +08:00
|
|
|
|
public DataLevel Cfg { get; private set; }
|
2023-11-20 14:10:18 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡名
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Name
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
get { return StringManager.Instance.GetLocalizeTextByKey(Cfg.Name); }
|
2024-09-02 15:32:25 +08:00
|
|
|
|
}
|
2023-11-22 15:05:43 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡描述
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Desc
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
get { return StringManager.Instance.GetLocalizeTextByKey(Cfg.Desc); }
|
2024-09-02 15:32:25 +08:00
|
|
|
|
}
|
2024-01-04 17:22:36 +08:00
|
|
|
|
|
2024-09-02 19:42:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 章节序号
|
|
|
|
|
|
/// </summary>
|
2024-02-06 13:29:01 +08:00
|
|
|
|
public int ChapterIndex
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-09-05 13:41:39 +08:00
|
|
|
|
if (-1 == chapterIndex)
|
2024-02-06 13:29:01 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
if (Cfg.Id < 100000)
|
2024-02-06 13:29:01 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
DebugUtil.LogError("关卡id为{0}的关卡id没到6位", Cfg.Id);
|
2024-02-06 13:29:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 13:41:39 +08:00
|
|
|
|
string resultStr = Cfg.Id.ToString().Substring(1, 2);
|
|
|
|
|
|
chapterIndex = int.Parse(resultStr);
|
2024-02-06 13:29:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 13:41:39 +08:00
|
|
|
|
return chapterIndex;
|
2024-02-06 13:29:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-13 14:18:34 +08:00
|
|
|
|
|
2024-09-02 19:42:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡序号
|
|
|
|
|
|
/// </summary>
|
2024-02-06 13:29:01 +08:00
|
|
|
|
public int LevelIndex
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-09-05 13:41:39 +08:00
|
|
|
|
if (-1 == levelIndex)
|
2024-02-06 13:29:01 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
if (Cfg.Id < 100000)
|
2024-02-06 13:29:01 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
DebugUtil.LogError("关卡id为{0}的关卡id没到6位", Cfg.Id);
|
2024-02-06 13:29:01 +08:00
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 13:41:39 +08:00
|
|
|
|
string resultStr = Cfg.Id.ToString().Substring(3, 3);
|
|
|
|
|
|
levelIndex = int.Parse(resultStr);
|
2024-02-06 13:29:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 13:41:39 +08:00
|
|
|
|
return levelIndex;
|
2024-02-06 13:29:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-06 12:22:29 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 索引名
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string IndexName
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return $"{ChapterIndex}-{LevelIndex}"; }
|
|
|
|
|
|
}
|
2023-10-19 15:00:19 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Data
|
2024-09-02 18:51:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 所属关卡组信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public LevelGroupInfo GroupInfo
|
|
|
|
|
|
{
|
2024-09-05 13:52:02 +08:00
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (LevelManager.Instance.TryGetLevelGroupInfoByID(Cfg.LevelGroupID, out LevelGroupInfo levelGroupInfo))
|
|
|
|
|
|
return levelGroupInfo;
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
2024-09-02 18:51:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 所属章节信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ChapterInfo ChapterInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return GroupInfo?.ChapterInfo; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 环境类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public EnvironmentType Environment
|
2024-04-18 18:14:18 +08:00
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-09-02 15:32:25 +08:00
|
|
|
|
if (null == MapData)
|
|
|
|
|
|
return EnvironmentType.Desert;
|
2023-10-19 15:00:19 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
return mapData.environmentType;
|
2024-04-18 18:14:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否锁住
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsLock { get; private set; } = true;
|
2024-04-18 18:14:18 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 能否进入
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool CanEnter
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return !IsLock && IsConstEnough(); }
|
2024-04-18 18:14:18 +08:00
|
|
|
|
}
|
2023-10-19 15:00:19 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 地图数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public MapData MapData
|
2024-04-13 14:18:34 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
get { return mapData ??= MapUtils.LoadMapData(Cfg.MapData); }
|
2024-04-13 14:18:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public LevelData LevelData
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
get { return levelData ??= LevelUtils.LoadLevelData(Cfg.Id); }
|
2024-09-02 15:32:25 +08:00
|
|
|
|
}
|
2023-10-19 15:00:19 +08:00
|
|
|
|
|
2024-09-02 15:32:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否剧情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsStory
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
get { return !string.IsNullOrWhiteSpace(Cfg.StoryID); }
|
2024-09-02 15:32:25 +08:00
|
|
|
|
}
|
2024-01-04 17:22:36 +08:00
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 环境buff描述
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string EnvironmentBuffString
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return CommonUtils.GetLocalizeText(TableManager.Instance.Tables.EnviormentConfig.Get((int)Environment).DescLocal);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-10-19 15:00:19 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-09-05 13:41:39 +08:00
|
|
|
|
#region 服务器数据
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// <summary>
|
2024-09-05 14:17:27 +08:00
|
|
|
|
/// 完成的星级或分数
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// </summary>
|
2024-09-05 14:17:27 +08:00
|
|
|
|
public int Score
|
2024-09-02 16:01:34 +08:00
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (null == serverData)
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
2024-09-05 14:17:27 +08:00
|
|
|
|
return ChapterInfo.Cfg.Type switch
|
|
|
|
|
|
{
|
|
|
|
|
|
E_ChapterType.War => serverData.Score,
|
|
|
|
|
|
_ => serverData.StarCount,
|
|
|
|
|
|
};
|
2024-09-02 16:01:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-10-24 14:58:21 +08:00
|
|
|
|
|
2024-09-05 15:48:15 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 最大星级或者分数
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int ScoreMax
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (ChapterInfo.Cfg.Type)
|
|
|
|
|
|
{
|
|
|
|
|
|
case E_ChapterType.War:
|
|
|
|
|
|
{
|
|
|
|
|
|
int total = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (null == levelData)
|
|
|
|
|
|
return total;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (ConditionModifier conditionModifier in levelData.scoreTarget)
|
|
|
|
|
|
{
|
|
|
|
|
|
total += conditionModifier.score;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return total;
|
|
|
|
|
|
}
|
|
|
|
|
|
default:
|
|
|
|
|
|
return (int)NLDPB.GlobalDefine.MaxLevelStar;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关卡评级
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public E_WarRating WarRating
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return LevelUtils.GetWarLevelRatingByLevelInfo(this); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 星级达成结果
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool[] StarResult
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (null == serverData)
|
2024-09-05 14:17:27 +08:00
|
|
|
|
return new bool[(int)NLDPB.GlobalDefine.MaxLevelStar];
|
2023-10-19 15:00:19 +08:00
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
return serverData.star.Select(s => s > 0).ToArray();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-02-06 13:29:01 +08:00
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否通关
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsPass
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (null == serverData)
|
|
|
|
|
|
return false;
|
2023-10-24 14:58:21 +08:00
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
return serverData.isPassed;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-11-02 20:02:10 +08:00
|
|
|
|
|
2024-09-02 16:01:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 红点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public RedPointNode RedPoint { get; private set; }
|
2023-10-19 15:00:19 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2024-09-02 14:08:35 +08:00
|
|
|
|
public LevelInfo(DataLevel config)
|
2023-10-19 15:00:19 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
Cfg = config;
|
2024-09-02 15:32:25 +08:00
|
|
|
|
IsLock = true;
|
2024-08-13 16:04:49 +08:00
|
|
|
|
RefreshServerData(true);
|
2023-10-19 15:00:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 14:17:27 +08:00
|
|
|
|
#region API
|
2024-09-13 14:22:11 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取解锁条件文本
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public string GetUnlockLocalizationText()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Cfg.Unlock.Length > 0)
|
|
|
|
|
|
return ConditionManager.Instance.GetConditionLocalization(Cfg.Unlock[0]);
|
|
|
|
|
|
else
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-05 14:17:27 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获得星级目标的文本
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="targetIndex"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public string GetStarTargetLocalizationText(int targetIndex)
|
|
|
|
|
|
{
|
|
|
|
|
|
List<ConditionModifier> starTarget = LevelData.starTarget;
|
|
|
|
|
|
if (targetIndex < 0 || targetIndex >= starTarget.Count)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
return starTarget[targetIndex].GetConditionLocalization();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 刷新服务器数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="isReset"></param>
|
|
|
|
|
|
public void RefreshServerData(bool isReset)
|
|
|
|
|
|
{
|
|
|
|
|
|
serverData = Actor.Instance.Level.GetLevelInfo((uint)Cfg.Id);
|
|
|
|
|
|
if (isReset)
|
|
|
|
|
|
{
|
|
|
|
|
|
IsLock = true;
|
|
|
|
|
|
AddLockConditionReaction();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 私有方法
|
2024-09-02 18:51:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 体力是否足够
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2023-10-19 15:00:19 +08:00
|
|
|
|
private bool IsConstEnough()
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
if (null == Cfg.CostItems || Cfg.CostItems.Count <= 0)
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
2023-10-19 15:00:19 +08:00
|
|
|
|
bool result = true;
|
2024-09-02 18:51:47 +08:00
|
|
|
|
foreach (cfg.item.ItemCounts costItem in Cfg.CostItems)
|
2023-10-19 15:00:19 +08:00
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
int currCount = (int)Actor.Instance.Item.GetItemCount(costItem.Id);
|
|
|
|
|
|
result &= currCount >= costItem.Count;
|
2023-10-19 15:00:19 +08:00
|
|
|
|
if (!result)
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
Debug.LogError($"关卡消耗品不足,level id:{Cfg.Id}");
|
2023-10-19 15:00:19 +08:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-10-24 14:58:21 +08:00
|
|
|
|
|
2023-10-19 15:00:19 +08:00
|
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 18:51:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 构造红点树
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parent"></param>
|
2023-11-02 20:02:10 +08:00
|
|
|
|
public void ConstructRedPointTree(RedPointNode parent)
|
|
|
|
|
|
{
|
2024-09-02 18:51:47 +08:00
|
|
|
|
RedPoint = RedPointManager.Instance.AddDynamicNode(NodeType.Level, parent, Cfg.Id);
|
2023-11-02 20:02:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 18:51:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加注册解锁条件
|
|
|
|
|
|
/// </summary>
|
2023-11-01 13:33:20 +08:00
|
|
|
|
private void AddLockConditionReaction()
|
|
|
|
|
|
{
|
2024-08-13 16:04:49 +08:00
|
|
|
|
ConditionReactor.Instance.RemoveReaction(unLockConditionId);
|
2024-09-02 18:51:47 +08:00
|
|
|
|
unLockConditionId = ConditionReactor.Instance.AddReaction(Cfg.Unlock, OnUnlockConditionChanged);
|
2023-11-01 13:33:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-09-02 18:51:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 解锁回调
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="result"></param>
|
|
|
|
|
|
/// <param name="callBackParam"></param>
|
|
|
|
|
|
/// <param name="reactionID"></param>
|
2023-11-01 13:33:20 +08:00
|
|
|
|
private void OnUnlockConditionChanged(bool result, object callBackParam, int reactionID)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (result)
|
|
|
|
|
|
{
|
|
|
|
|
|
IsLock = false;
|
2024-09-05 13:41:39 +08:00
|
|
|
|
DebugUtil.Log($"关卡未解锁,id:{Cfg.Id}");
|
2024-09-02 18:51:47 +08:00
|
|
|
|
EventManager.Instance.Send(EventManager.EventName.LevelUnlock, Cfg.Id);
|
2023-11-01 13:33:20 +08:00
|
|
|
|
ConditionReactor.Instance.RemoveReaction(reactionID);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-06-27 18:55:53 +08:00
|
|
|
|
|
|
|
|
|
|
public void ConstructRedPointTree(int parentID)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
2024-09-05 14:17:27 +08:00
|
|
|
|
#endregion
|
2024-09-05 15:48:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 战役评级
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public enum E_WarRating
|
|
|
|
|
|
{
|
|
|
|
|
|
C = 0,
|
|
|
|
|
|
B = 1,
|
|
|
|
|
|
A = 2,
|
|
|
|
|
|
S = 3
|
2023-10-24 14:58:21 +08:00
|
|
|
|
}
|