diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs b/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs new file mode 100644 index 00000000..46871868 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs @@ -0,0 +1,32 @@ +using System;
+
+namespace XMainClient
+{
+ internal class XBuffTriggerByCombo : XBuffTrigger
+ {
+ private uint m_Base;
+
+ private uint m_Count;
+
+ public XBuffTriggerByCombo(XBuff buff) : base(buff)
+ {
+ this.m_Base = (uint)base._GetTriggerParamInt(buff.BuffInfo, 0);
+ bool flag = this.m_Base == 0u;
+ if (flag)
+ {
+ this.m_Base = 1u;
+ }
+ }
+
+ public override bool CheckTriggerCondition()
+ {
+ return this.m_Count != 0u && this.m_Count % this.m_Base == 0u;
+ }
+
+ public override void OnComboChange(uint comboCount)
+ {
+ this.m_Count = comboCount;
+ base.Trigger();
+ }
+ }
+}
|