summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs
new file mode 100644
index 00000000..4ec5fd38
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs
@@ -0,0 +1,40 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactQuanlityFx
+ {
+ private bool m_isUsing = false;
+
+ private ulong m_key = 0UL;
+
+ private XFx m_fx = null;
+
+ public void SetData(ulong key, Transform tra, string path)
+ {
+ this.Reset();
+ this.m_isUsing = true;
+ this.m_key = key;
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateUIFx(path, tra, false);
+ }
+
+ public void Reset()
+ {
+ this.m_key = 0UL;
+ this.m_isUsing = false;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ }
+
+ public bool IsCanReuse(ulong key)
+ {
+ return this.m_isUsing && this.m_key == key;
+ }
+ }
+}