集成 Game Core P0 纵向切片
This commit is contained in:
@@ -510,15 +510,10 @@ public sealed class UIPanelAttribute : Attribute
|
||||
public string Path { get; }
|
||||
public PanelStrategy? OverrideStrategy { get; }
|
||||
|
||||
public UIPanelAttribute(
|
||||
string layer,
|
||||
string path = null,
|
||||
PanelStrategy? overrideStrategy = null)
|
||||
{
|
||||
Layer = layer;
|
||||
Path = path;
|
||||
OverrideStrategy = overrideStrategy;
|
||||
}
|
||||
public UIPanelAttribute(string layer);
|
||||
public UIPanelAttribute(string layer, string path);
|
||||
public UIPanelAttribute(string layer, PanelStrategy overrideStrategy);
|
||||
public UIPanelAttribute(string layer, string path, PanelStrategy overrideStrategy);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -549,6 +544,7 @@ public abstract class UIPanelBase<TViewModel> : MonoBehaviour
|
||||
|
||||
- Panel 必须声明 `UIPanelAttribute`。
|
||||
- Attribute 未指定 path 时,按命名约定推导资源路径。
|
||||
- C# Attribute 构造参数不支持 `Nullable<T>`,因此 `OverrideStrategy` 属性保持 nullable,但构造函数通过重载表达“未指定”和“指定覆盖策略”。
|
||||
- 同层级采用 LIFO 栈。
|
||||
- 关闭非栈顶 Panel 抛异常。
|
||||
- Destroy 策略关闭时释放资源 handle。
|
||||
|
||||
@@ -44,15 +44,10 @@ public sealed class UIPanelAttribute : Attribute
|
||||
public string Path { get; }
|
||||
public PanelStrategy? OverrideStrategy { get; }
|
||||
|
||||
public UIPanelAttribute(
|
||||
string layer,
|
||||
string path = null,
|
||||
PanelStrategy? overrideStrategy = null)
|
||||
{
|
||||
Layer = layer;
|
||||
Path = path;
|
||||
OverrideStrategy = overrideStrategy;
|
||||
}
|
||||
public UIPanelAttribute(string layer);
|
||||
public UIPanelAttribute(string layer, string path);
|
||||
public UIPanelAttribute(string layer, PanelStrategy overrideStrategy);
|
||||
public UIPanelAttribute(string layer, string path, PanelStrategy overrideStrategy);
|
||||
}
|
||||
```
|
||||
|
||||
@@ -61,6 +56,7 @@ public sealed class UIPanelAttribute : Attribute
|
||||
- `Layer` 必填。
|
||||
- `Path` 可选;未填时按命名约定推导。
|
||||
- `OverrideStrategy` 可选,优先于层级默认策略。
|
||||
- 说明:C# Attribute 构造参数不支持 `Nullable<T>`,因此 `OverrideStrategy` 属性保持 nullable,但通过重载表达“未指定”和“指定覆盖策略”。
|
||||
|
||||
## Panel 基类
|
||||
|
||||
|
||||
Reference in New Issue
Block a user