| | |
| | | public class BattleRootNode : MonoBehaviour |
| | | { |
| | | public RectTransform redTeamNode; |
| | | public List<GameObject> redTeamNodeList = new List<GameObject>(); |
| | | public List<GameObject> redTeamNodeList |
| | | { |
| | | get |
| | | { |
| | | return _redTeamNodeList; |
| | | } |
| | | } |
| | | |
| | | private List<GameObject> _redTeamNodeList = new List<GameObject>(); |
| | | |
| | | public RectTransform blueTeamNode; |
| | | public List<GameObject> blueTeamNodeList = new List<GameObject>(); |
| | | public List<GameObject> blueTeamNodeList |
| | | { |
| | | get |
| | | { |
| | | return _blueTeamNodeList; |
| | | } |
| | | } |
| | | |
| | | private List<GameObject> _blueTeamNodeList = new List<GameObject>(); |
| | | |
| | | public RawImage imgBackground; |
| | | public RectTransform bgPos1; |
| | | public RectTransform bgPos2; |
| | | public RectTransform battleNode; |
| | | public RectTransform battleNodePos1; |
| | | public RectTransform battleNodePos2; |
| | | |
| | | public RendererAdjuster skillMaskAdjuster; |
| | | |
| | | public RendererAdjuster battleStartAdjuster; |
| | | |
| | | public RendererAdjuster backgroundAdjuster; |
| | | |
| | | void Awake() |
| | | { |
| | | if (redTeamNodeList.Count != TeamConst.MaxTeamSlotCount) |
| | | for (int i = 1; i <= TeamConst.MaxTeamSlotCount; i++) |
| | | { |
| | | Debug.LogError("redTeamNodeList count is not equal to MaxTeamSlotCount: " + redTeamNodeList.Count); |
| | | } |
| | | Transform redTrans = redTeamNode.Find("Pos" + i); |
| | | _redTeamNodeList.Add(redTrans.gameObject); |
| | | |
| | | if (blueTeamNodeList.Count != TeamConst.MaxTeamSlotCount) |
| | | { |
| | | Debug.LogError("blueTeamNodeList count is not equal to MaxTeamSlotCount: " + blueTeamNodeList.Count); |
| | | Transform blueTrans = blueTeamNode.Find("Pos" + i); |
| | | _blueTeamNodeList.Add(blueTrans.gameObject); |
| | | } |
| | | DontDestroyOnLoad(gameObject); |
| | | |
| | | |
| | | |
| | | // SetSortingOrder(); |
| | | } |
| | | |
| | | public void SetBackground(Texture texture) |
| | | { |
| | | if (imgBackground != null) |
| | | { |
| | | imgBackground.texture = texture; |
| | | imgBackground.raycastTarget = false; |
| | | // imgBackground.SetNativeSize(); |
| | | } |
| | | } |
| | | |
| | | public void SetSortingOrder() |
| | | { |
| | | skillMaskAdjuster.SetSortingOrder(BattleConst.BlockerSortingOrder); |
| | | battleStartAdjuster.SetSortingOrder(BattleConst.BattleWinSortingOrder + 1);//最高层 |
| | | backgroundAdjuster.SetSortingOrder(BattleConst.BattleBackgroundOrder);//最低层 |
| | | } |
| | | |
| | | public Transform skillBackNode; |
| | | |
| | | public Transform skillFrontNode; |
| | | |
| | | public GameObject skillMaskNode; |
| | | |
| | | public GameObject battleStartNode; |
| | | } |