123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 loyalsoft. All rights reserved.
- // Homepage: http://www.game7000.com/
- // Feedback: http://www.game7000.com/
- //------------------------------------------------------------
- namespace GameFramework.Entity
- {
- /// <summary>
- /// 显示实体成功事件。
- /// </summary>
- public sealed class ShowEntitySuccessEventArgs : GameFrameworkEventArgs
- {
- /// <summary>
- /// 初始化显示实体成功事件的新实例。
- /// </summary>
- public ShowEntitySuccessEventArgs()
- {
- Entity = null;
- Duration = 0f;
- UserData = null;
- }
- /// <summary>
- /// 获取显示成功的实体。
- /// </summary>
- public IEntity Entity
- {
- get;
- private set;
- }
- /// <summary>
- /// 获取加载持续时间。
- /// </summary>
- public float Duration
- {
- get;
- private set;
- }
- /// <summary>
- /// 获取用户自定义数据。
- /// </summary>
- public object UserData
- {
- get;
- private set;
- }
- /// <summary>
- /// 创建显示实体成功事件。
- /// </summary>
- /// <param name="entity">加载成功的实体。</param>
- /// <param name="duration">加载持续时间。</param>
- /// <param name="userData">用户自定义数据。</param>
- /// <returns>创建的显示实体成功事件。</returns>
- public static ShowEntitySuccessEventArgs Create(IEntity entity, float duration, object userData)
- {
- ShowEntitySuccessEventArgs showEntitySuccessEventArgs = ReferencePool.Acquire<ShowEntitySuccessEventArgs>();
- showEntitySuccessEventArgs.Entity = entity;
- showEntitySuccessEventArgs.Duration = duration;
- showEntitySuccessEventArgs.UserData = userData;
- return showEntitySuccessEventArgs;
- }
- /// <summary>
- /// 清理显示实体成功事件。
- /// </summary>
- public override void Clear()
- {
- Entity = null;
- Duration = 0f;
- UserData = null;
- }
- }
- }
|