From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/ArtifactElementData.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/ArtifactElementData.cs (limited to 'Client/Assets/Scripts/XMainClient/ArtifactElementData.cs') diff --git a/Client/Assets/Scripts/XMainClient/ArtifactElementData.cs b/Client/Assets/Scripts/XMainClient/ArtifactElementData.cs new file mode 100644 index 00000000..fbe5c988 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/ArtifactElementData.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; + +namespace XMainClient +{ + internal class ArtifactElementData : IComparable + { + public bool Show = false; + + public bool Redpoint = false; + + public uint ElementType = 0u; + + public List List = null; + + public int CompareTo(ArtifactElementData other) + { + int sortId = this.GetSortId(this.ElementType); + int sortId2 = this.GetSortId(other.ElementType); + return sortId - sortId2; + } + + private int GetSortId(uint elementType) + { + int result; + switch (elementType) + { + case 2121u: + result = 4; + break; + case 2122u: + result = 8; + break; + case 2123u: + result = 1; + break; + case 2124u: + result = 5; + break; + case 2125u: + result = 3; + break; + case 2126u: + result = 7; + break; + case 2127u: + result = 2; + break; + case 2128u: + result = 6; + break; + default: + result = 0; + break; + } + return result; + } + } +} -- cgit v1.1-26-g67d0