| | |
| | | battleRootNode.transform.SetParent(Launch.Instance.transform); |
| | | battleRootNode.transform.localPosition = new Vector3(-10000, -10000, 0); |
| | | } |
| | | battleField = null; |
| | | |
| | | if (battleField != null) |
| | | { |
| | | battleField.OnRoundChange -= OnRoundChange; |
| | | battleField = null; |
| | | } |
| | | } |
| | | |
| | | public void SetBattleField(BattleField _battleField) |
| | | { |
| | | if (battleField != null) |
| | | { |
| | | battleField.OnRoundChange -= OnRoundChange; |
| | | battleField = null; |
| | | } |
| | | |
| | | battleField = _battleField; |
| | | if (battleRootNode != null) |
| | | { |
| | |
| | | textSpeed.text = (BattleManager.Instance.speedIndex + 1).ToString(); |
| | | DisplayHpInfo(); |
| | | DisplayPlayerInfo(); |
| | | UpdateRoundDisplay(); |
| | | battleField.OnRoundChange -= OnRoundChange; |
| | | battleField.OnRoundChange += OnRoundChange; |
| | | OnRoundChange(battleField.round, battleField.turnMax); |
| | | } |
| | | private void DisplayHpInfo() |
| | | { |
| | |
| | | return teamHeroes; |
| | | |
| | | } |
| | | public void UpdateRoundDisplay() |
| | | |
| | | private void OnRoundChange(int round, int maxRound) |
| | | { |
| | | if (battleField == null) |
| | | return; |
| | | txtWaveInfo.text = Language.Get("BoneField09", battleField.round, battleField.turnMax); |
| | | txtWaveInfo.text = string.Format("{0}/{1}", round, maxRound); |
| | | } |
| | | |
| | | bool IsOpenBattleChangeTab() |