少年修仙传客户端代码仓库
client_linchunjie
2018-09-19 4ddb4556bde9483379cb1a56025c95dfb008192d
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
namespace Snxxz.UI
{
    public class TalentTreeBehaviour : MonoBehaviour
    {
        [SerializeField] TalentTree[] talentTrees;
 
        public bool BelongToTalentTree(int job, int series, int type)
        {
            for (int i = 0; i < talentTrees.Length; i++)
            {
                var talentTree = talentTrees[i];
                if (talentTree.job == job && talentTree.series == series
                    && talentTree.type == type)
                {
                    return true;
                }
            }
            return false;
        }
    }
 
    [Serializable]
    public struct TalentTree
    {
        public int job;
        public int series;
        public int type;
    }
}