多轮审查和修复

This commit is contained in:
2026-05-12 15:34:08 +08:00
parent f55d2a57c3
commit ebbbb7332e
805 changed files with 838724 additions and 1905 deletions

View File

@@ -0,0 +1,22 @@
using UnityEngine;
using BaseGames.Core.Save;
namespace BaseGames.Progression
{
/// <summary>
/// 由事件触发的成就条件(使用 World.Switches 中的布尔标志位)。
/// 由代码如剧情节点、NPC 交互写入标志AchievementManager 轮询检查。
/// </summary>
[CreateAssetMenu(menuName = "Achievement/Condition/EventTriggered", fileName = "COND_EventTriggered_")]
public class EventTriggeredCondition : AchievementCondition
{
[Tooltip("World.Switches 中用于标记此事件发生的布尔 Key")]
public string flagKey;
public override bool IsMet(SaveData save)
{
if (save?.World?.Switches == null || string.IsNullOrEmpty(flagKey)) return false;
return save.World.Switches.TryGetValue(flagKey, out bool val) && val;
}
}
}