- 规范 UI 设计成为:
- UIForm 负责展示
- Controller 负责控制
- UseCase 负责业务逻辑
- RawData 负责提供原始数据
- Context 负责为 UIForm 提供数据
- 添加和补充一系列 UI 功能
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using GameFramework;
|
||||
using GameFramework.Event;
|
||||
|
||||
namespace CustomEvent
|
||||
{
|
||||
public class LevelUpPropSelectedEventArgs : GameEventArgs
|
||||
{
|
||||
public static readonly int EventId = typeof(LevelUpPropSelectedEventArgs).GetHashCode();
|
||||
|
||||
public override int Id => EventId;
|
||||
|
||||
public int SelectedId { get; private set; }
|
||||
|
||||
public LevelUpPropSelectedEventArgs()
|
||||
{
|
||||
SelectedId = -1;
|
||||
}
|
||||
|
||||
public static LevelUpPropSelectedEventArgs Create(int propId)
|
||||
{
|
||||
var args = ReferencePool.Acquire<LevelUpPropSelectedEventArgs>();
|
||||
args.SelectedId = propId;
|
||||
return args;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
SelectedId = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3183e53376fbf95438a0a938510ce7f1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user