少年修仙传客户端代码仓库
Client_PangDeRong
2018-09-21 d1a2ab5b56bae336a1b5cbc4f307cb67e76c22e6
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TableConfig;
namespace Snxxz.UI
{
    public class SkillDetails
    {
        public static SkillSourceType sourceType { get; private set; }
 
        public static SkillConfig skillModel { get; private set; }
 
        public static List<string> infoList = new List<string>();
 
        public static string skillSource { get; private set; }
 
        public static int fightPower { get; private set; }
 
        public static void ShowSkillDetails(int _skillid, SkillSourceType _type, int _fightPower, params string[] _infos)
        {
            fightPower = _fightPower;
            sourceType = _type;
            skillModel = Config.Instance.Get<SkillConfig>(_skillid);
            infoList.Clear();
            switch (_type)
            {
                case SkillSourceType.MagicianSkill:
                    {
                        skillSource = _infos[0];
                        infoList.Add(skillModel.Description);
                        infoList.Add(_infos[1]);
                    }
                    break;
                case SkillSourceType.PlayerSkill:
                    skillSource = skillModel.SkillName;
                    infoList.Add(skillModel.Description);
                    break;
                case SkillSourceType.PetSkill:
                    if (_infos.Length <= 0)
                    {
                        infoList.Add(skillModel.Description);
                    }
                    else if (_infos.Length == 1)
                    {
                        infoList.Add(_infos[0]);
                    }
                    else if (_infos.Length == 2)
                    {
                        infoList.Add(_infos[0]);
                        infoList.Add(_infos[1]);
 
                    }
                    else if (_infos.Length == 3)
                    {
                        infoList.Add(skillModel.Description);
                        infoList.Add(_infos[2]);
                    }
                    break;
                case SkillSourceType.ViewHorsePet:
                    infoList.Add(skillModel.Description);
                    infoList.Add(_infos[0]);
                    break;
                case SkillSourceType.BlastFurnace:
                    skillSource = _infos[0];
                    infoList.Add(skillModel.Description);
                    break;
                case SkillSourceType.DogzSkill:
                    infoList.Add(skillModel.Description);
                    break;
            }
            if (!WindowCenter.Instance.CheckOpen<SkillDetailsWin>())
            {
                WindowCenter.Instance.Open<SkillDetailsWin>();
            }
        }
 
        public enum SkillSourceType
        {
            MagicianSkill = 0,
            PlayerSkill = 1,
            PetSkill = 2,
            BlastFurnace = 3,
            ViewHorsePet = 4,
            DogzSkill = 5,
        }
    }
}