按 UI 五层规范重构 SelectRoleForm 并整理事件目录
- SelectRoleForm 五层归位:UseCase 改为构造注入 IProcedureMenu(新增 Runtime/ProcedureInterface),RawData 暴露原始 StatModifier[] 而非展示串,Controller 复用 ItemDescUtility 拼装属性文本,并修复 OpenUIAsync(object) 合法 RawData 分支缺少 return 的误报路径 - StatModifier 去展示职责:删除 _statTypeNames / ToString,富文本格式化下沉到 Presentation 层的 ItemDescUtility.Describe(StatModifier),CreatePropDescription 改用统一入口 - 事件目录按 UIForm 归档:Base/Event/UI/Menu/* 拆解到 SelectRoleForm/ MenuForm/ DialogForm/ DisplayItemInfoForm/ Combat/ 等各自子目录,MenuSelectRoleReturnEventArgs 改名 SelectRoleReturnEventArgs,语义归属本 UI 模块 - IUIFormController → IUIController 改名,联动 UIControllerBase / UIRouterComponent / Editor - 同步更新 docs/UI-5层架构设计规范.md 中相关示例与 MenuForm.prefab、ProcedureMenu 引用
This commit is contained in:
@@ -7,61 +7,10 @@ namespace SepCore.Definition
|
||||
{
|
||||
public class StatModifier
|
||||
{
|
||||
// None = 0,
|
||||
// MaxHealth = 1,
|
||||
// MovementSpeed = 2,
|
||||
// Attack = 3,
|
||||
// Defense = 4,
|
||||
// AttackSpeed = 5,
|
||||
// Critical = 6,
|
||||
// CriticalDamage = 7,
|
||||
// Dodge = 8,
|
||||
// AbsorbRange = 9
|
||||
|
||||
private readonly string[] _statTypeNames =
|
||||
{
|
||||
"无效",
|
||||
"最大生命",
|
||||
"移动速度",
|
||||
"伤害",
|
||||
"防御",
|
||||
"冷却",
|
||||
"暴击率",
|
||||
"暴击伤害",
|
||||
"闪避",
|
||||
"金币/经验吸收范围"
|
||||
};
|
||||
|
||||
public StatType StatType;
|
||||
public float Value;
|
||||
public bool IsPercent;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (IsPercent)
|
||||
{
|
||||
if (Value > 0)
|
||||
{
|
||||
return $"{_statTypeNames[(int)StatType]}: <color=green>+{Value * 100}%</color>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"{_statTypeNames[(int)StatType]}: <color=red>+{Value * 100}%</color>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Value > 0)
|
||||
{
|
||||
return $"{_statTypeNames[(int)StatType]}: <color=green>+{Value}</color>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"{_statTypeNames[(int)StatType]}: <color=red>+{Value}</color>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static StatModifier StringToModifier(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3de64a3f2f644813b51e5145d0a9431c
|
||||
timeCreated: 1781403042
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 458b35bb1d1848c598f1d318c6523a6a
|
||||
timeCreated: 1781402959
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15844be485c343f0a94e2e6fcd90022d
|
||||
timeCreated: 1781403001
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f52f9694158bfda42a01330b373cbfe9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8fc42c90ffa598d4e89c908ad82116d8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user