From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XAttrItem.cs | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XAttrItem.cs (limited to 'Client/Assets/Scripts/XMainClient/XAttrItem.cs') diff --git a/Client/Assets/Scripts/XMainClient/XAttrItem.cs b/Client/Assets/Scripts/XMainClient/XAttrItem.cs new file mode 100644 index 00000000..581b47e8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XAttrItem.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using XUtliPoolLib; + +namespace XMainClient +{ + internal abstract class XAttrItem : XItem + { + public List changeAttr = new List(); + + public IEnumerable BasicAttr() + { + return this.changeAttr; + } + + public override void Init() + { + base.Init(); + this.changeAttr.Clear(); + } + + public override uint GetPPT(XAttributes attributes = null) + { + double num = 0.0; + for (int i = 0; i < this.changeAttr.Count; i++) + { + num += XSingleton.singleton.GetPPT(this.changeAttr[i], attributes, -1); + } + return (uint)num; + } + } +} -- cgit v1.1-26-g67d0