-
Notifications
You must be signed in to change notification settings - Fork 561
Expand file tree
/
Copy pathOpenUIFormSuccessEventArgs.cs
More file actions
96 lines (87 loc) · 2.62 KB
/
OpenUIFormSuccessEventArgs.cs
File metadata and controls
96 lines (87 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
using GameFramework.Event;
using GameFramework.UI;
namespace UnityGameFramework.Runtime
{
/// <summary>
/// 打开界面成功事件。
/// </summary>
public sealed class OpenUIFormSuccessEventArgs : GameEventArgs
{
/// <summary>
/// 打开界面成功事件编号。
/// </summary>
public static readonly int EventId = typeof(OpenUIFormSuccessEventArgs).GetHashCode();
/// <summary>
/// 初始化打开界面成功事件的新实例。
/// </summary>
public OpenUIFormSuccessEventArgs()
{
UIForm = null;
Duration = 0f;
UserData = null;
}
/// <summary>
/// 获取打开界面成功事件编号。
/// </summary>
public override int Id
{
get
{
return EventId;
}
}
/// <summary>
/// 获取打开成功的界面。
/// </summary>
public IUIForm UIForm
{
get;
private set;
}
/// <summary>
/// 获取加载持续时间。
/// </summary>
public float Duration
{
get;
private set;
}
/// <summary>
/// 获取用户自定义数据。
/// </summary>
public object UserData
{
get;
private set;
}
/// <summary>
/// 创建打开界面成功事件。
/// </summary>
/// <param name="e">内部事件。</param>
/// <returns>创建的打开界面成功事件。</returns>
public static OpenUIFormSuccessEventArgs Create(GameFramework.UI.OpenUIFormSuccessEventArgs e)
{
OpenUIFormSuccessEventArgs openUIFormSuccessEventArgs = ReferencePool.Acquire<OpenUIFormSuccessEventArgs>();
openUIFormSuccessEventArgs.UIForm = (IUIForm)e.UIForm;
openUIFormSuccessEventArgs.Duration = e.Duration;
openUIFormSuccessEventArgs.UserData = e.UserData;
return openUIFormSuccessEventArgs;
}
/// <summary>
/// 清理打开界面成功事件。
/// </summary>
public override void Clear()
{
UIForm = null;
Duration = 0f;
UserData = null;
}
}
}