yyl
10 天以前 6a10188f3eddc740b9b8b1e7eefb0e2fdb3850e3
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
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.UI;
 
public class BattleRootNode : MonoBehaviour
{
    public RectTransform redTeamNode;
    public List<GameObject> redTeamNodeList
    {
        get
        {
            return _redTeamNodeList;
        }
    }
 
    private List<GameObject> _redTeamNodeList = new List<GameObject>();
 
    public RectTransform blueTeamNode;
    public List<GameObject> blueTeamNodeList
    {
        get
        {
            return _blueTeamNodeList;
        }
    }
 
    private List<GameObject> _blueTeamNodeList = new List<GameObject>();
 
    public RawImage imgBackground;
 
    void Awake()
    {
        for (int i = 1; i <= TeamConst.MaxTeamSlotCount; i++)
        {
            Transform redTrans = redTeamNode.Find("Pos" + i);
            _redTeamNodeList.Add(redTrans.gameObject);
 
            Transform blueTrans = blueTeamNode.Find("Pos" + i);
            _blueTeamNodeList.Add(blueTrans.gameObject);
        }
        DontDestroyOnLoad(gameObject);
    }
 
    public void SetBackground(Texture texture)
    {
        if (imgBackground != null)
        {
            imgBackground.texture = texture;
            // imgBackground.SetNativeSize();
        }
    }
 
    public Transform skillBackNode;
 
    public Transform skillFrontNode;
 
    public GameObject skillMaskNode;
}