少年修仙传客户端代码仓库
client_Hale
2019-04-13 d4b5806a57e4e88a1fc57dd95f17e185f33e4e43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
namespace Snxxz.UI
{
 
    public class EquipSetStar
    {
        public readonly int level = 0;
        Dictionary<int, int> equipStars = new Dictionary<int, int>();
 
        public EquipSetStar(int level)
        {
            this.level = level;
        }
 
        public int GetTotalStarLevel()
        {
            var totalLevel = 0;
            foreach (var starLevel in equipStars.Values)
            {
                totalLevel += starLevel;
            }
 
            return totalLevel;
        }
 
        public void UpdateEquipStarLevel(int place, int level)
        {
            equipStars[place] = level;
        }
 
        public int GetEquipStarLevel(int place)
        {
            return equipStars.ContainsKey(place) ? equipStars[place] : 0;
        }
 
        public int GetEquipCountWhichStarLevelLq(int standard)
        {
            var count = 0;
            foreach (var starLevel in equipStars.Values)
            {
                count += starLevel >= standard ? 1 : 0;
            }
 
            return count;
        }
 
    }
 
    public enum EquipSuitType
    {
        TwoSuit = 2,
        FiveSuit = 5,
        EightSuit = 8,
    }
 
}