UI系统
This commit is contained in:
43
Assets/_Game/Scripts/UI/MainMenu/NewGameModeConfigSO.cs
Normal file
43
Assets/_Game/Scripts/UI/MainMenu/NewGameModeConfigSO.cs
Normal 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("难度名标签本地化 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user