Files
zeling_v2/Assets/_Game/Scripts/UI/MainMenu/NewGameModeConfigSO.cs
2026-06-07 11:49:55 +08:00

44 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}
}