using System; using UnityEngine; using BaseGames.Core.Events; namespace BaseGames.UI.MainMenu { /// /// 新游戏难度选择数据表(策划编辑)。按顺序列出可选难度; /// 据此生成按钮,点击返回对应 。 /// 策划可增删 / 重排 / 改标签 / 改说明,无需改代码。样式改 UI_NewGameModePanel / UI_MainMenu_Button 预制件。 /// [CreateAssetMenu(menuName = "BaseGames/UI/New Game Mode Config", fileName = "UI_NewGameModeConfig")] public class NewGameModeConfigSO : ScriptableObject { [Serializable] public struct Item { [Tooltip("此项对应的难度等级。")] public DifficultyLevel level; [Tooltip("难度名标签本地化 Key(UI 表,如 MODE_NORMAL)。")] public string labelKey; [Tooltip("难度说明本地化 Key(选中该项时显示,可空,如 MODE_STEELSOUL_DESC)。")] public string descKey; [Tooltip("难度图标(可空)。")] public Sprite icon; } [Tooltip("面板标题本地化 Key。")] [SerializeField] private string _titleKey = "MODE_SELECT_TITLE"; [Tooltip("返回按钮本地化 Key。")] [SerializeField] private string _backLabelKey = "BTN_BACK"; [SerializeField] private Item[] _items; public string TitleKey => _titleKey; public string BackLabelKey => _backLabelKey; public Item[] Items => _items; } }