Files
bansonic_beta_main/Assets/scripts/Combat/SkillGroup.cs
T

45 lines
1.6 KiB
C#

using UnityEngine;
[System.Serializable]
public class SkillGroup
{
[Tooltip("Numeric ID used to reference this skill group (e.g. from equipped slots). Use 0 for 'none'.")]
public int skillGroupID = 0;
[Tooltip("Optional human-readable name for the group (for designers).")]
public string groupName = "";
// 新增:栏目编号,用于分组和排序
public int columnID = 0;
// 新增:栏目名字,用于UI显示
public string columnName = "";
// Variable-length list of SkillDefinitions so one group ID can map to multiple skills
public SkillDefinition[] skills = new SkillDefinition[0];
// Single icon representing this skill group (editable in Inspector)
[Header("Group Icon")]
[Tooltip("Optional single Sprite used as an icon for this skill group.")]
public Sprite groupIcon = null;
// Single multiline description for the skill group (editable in Inspector)
[Header("Group-level designer notes")]
[TextArea(3, 10)]
[Tooltip("A multiline description for this skill group. Use this to store notes or an overview that can be shown at runtime.")]
public string skillDescriptionsText = "";
// Backwards-compatible accessor that previously returned a per-skill description.
// Now returns the single group-level text so callers can still obtain a description string.
public string GetSkillDescription(int index)
{
return skillDescriptionsText ?? string.Empty;
}
// Lookup by SkillDefinition instance; also returns group-level text for compatibility.
public string GetSkillDescription(SkillDefinition def)
{
return skillDescriptionsText ?? string.Empty;
}
}