This commit is contained in:
2026-06-07 11:49:55 +08:00
parent ff0f3bde54
commit 1897658a00
98 changed files with 9903 additions and 13907 deletions

View File

@@ -0,0 +1,43 @@
using System;
using UnityEngine;
using BaseGames.Core.Events;
namespace BaseGames.UI.MainMenu
{
/// <summary>
/// 新游戏难度选择数据表(策划编辑)。按顺序列出可选难度;
/// <see cref="NewGameModeController"/> 据此生成按钮,点击返回对应 <see cref="DifficultyLevel"/>。
/// 策划可增删 / 重排 / 改标签 / 改说明,无需改代码。样式改 UI_NewGameModePanel / UI_MainMenu_Button 预制件。
/// </summary>
[CreateAssetMenu(menuName = "BaseGames/UI/New Game Mode Config", fileName = "UI_NewGameModeConfig")]
public class NewGameModeConfigSO : ScriptableObject
{
[Serializable]
public struct Item
{
[Tooltip("此项对应的难度等级。")]
public DifficultyLevel level;
[Tooltip("难度名标签本地化 KeyUI 表,如 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;
}
}