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(); 
 | 
        } 
 | 
    } 
 | 
} 
 |