From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Buff/XBuffChangeEventArgs.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs (limited to 'Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs') diff --git a/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs b/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs new file mode 100644 index 00000000..fdc3892f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs @@ -0,0 +1,65 @@ +using System; + +namespace XMainClient +{ + internal class XBuffChangeEventArgs : XEventArgs + { + public UIBuffInfo addBuff; + + public UIBuffInfo removeBuff; + + public UIBuffInfo updateBuff; + + public XEntity entity; + + public XBuffChangeEventArgs() + { + this._eDefine = XEventDefine.XEvent_BuffChange; + this.addBuff = null; + this.removeBuff = null; + this.updateBuff = null; + this.entity = null; + } + + public override void Recycle() + { + base.Recycle(); + this.addBuff = null; + this.removeBuff = null; + this.updateBuff = null; + this.entity = null; + XEventPool.Recycle(this); + } + + public UIBuffInfo GetActive() + { + bool flag = this.addBuff != null; + UIBuffInfo result; + if (flag) + { + result = this.addBuff; + } + else + { + bool flag2 = this.removeBuff != null; + if (flag2) + { + result = this.removeBuff; + } + else + { + bool flag3 = this.updateBuff != null; + if (flag3) + { + result = this.updateBuff; + } + else + { + result = null; + } + } + } + return result; + } + } +} -- cgit v1.1-26-g67d0