多轮审查和修复

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>收集指定数量魅饰Charm的成就条件。</summary>
[CreateAssetMenu(menuName = "Achievement/Condition/CollectedAllCharms", fileName = "COND_CollectedAllCharms")]
public class CollectedAllCharmsCondition : AchievementCondition
{
[Tooltip("需要收集的魅饰总数(游戏设计时确定)")]
[Min(1)] public int totalCharmsCount = 45;
public override bool IsMet(SaveData save)
=> save?.Equipment != null && save.Equipment.OwnedCharmIds.Count >= totalCharmsCount;
public override float GetProgress(SaveData save)
{
if (save?.Equipment == null || totalCharmsCount <= 0) return 0f;
return UnityEngine.Mathf.Clamp01((float)save.Equipment.OwnedCharmIds.Count / totalCharmsCount);
}
}
}