多轮审查和修复

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

@@ -4,11 +4,31 @@ namespace BaseGames.Player
{
/// <summary>
/// 形态切换配置 ScriptableObject。
/// Phase 1 骨架 — Phase 2 FormController 实现三形态切换时补充字段
/// 单一资产forms[0..2] = Sky / Earth / Death架构 05 §18
/// ⚠️ 只有 1 个 FormConfigSO 资产FormSO × 3 存于 forms[] 数组中,不分开建立。
/// </summary>
[CreateAssetMenu(menuName = "Player/FormConfig")]
public class FormConfigSO : ScriptableObject
{
// Phase 2: 填入 Normal / Soul / Spirit 三形态参数
[Header("形态列表 (forms[0]=Sky, forms[1]=Earth, forms[2]=Death)")]
public FormSO[] forms;
/// <summary>按形态类型查找对应 FormSO找不到返回 null。</summary>
public FormSO GetFormByType(FormType type)
{
if (forms == null) return null;
foreach (var f in forms)
if (f != null && f.formType == type) return f;
return null;
}
/// <summary>返回指定 FormSO 在 forms 数组中的索引;找不到返回 -1。</summary>
public int GetFormIndex(FormSO form)
{
if (forms == null || form == null) return -1;
for (int i = 0; i < forms.Length; i++)
if (forms[i] == form) return i;
return -1;
}
}
}