public void RefreshDefenceCampInfo(DicePanelParam dicePanelParam) { defenceCampName.text = dicePanelParam.campName; defenceCampIcon.sprite = dicePanelParam.campIcon; defenceCampBattleUnitCount.text = string.Format("× {0}", dicePanelParam.diceRolls.ToString()); defenceCampResult.text = dicePanelParam.diceResult.ToString(); }
private void ShowDiceRollPanel(DicePanelParam attackLandParam, DicePanelParam defenceLandParam) { //弹出骰子面板 if (_battleDicePanel == null) { _battleDicePanel = GlobalUImanager.Instance.BattleDicePanel.GetComponent <BattleDicePanel>(); } _battleDicePanel.RefreshAttackCampInfo(attackLandParam); _battleDicePanel.RefreshDefenceCampInfo(defenceLandParam); _battleDicePanel.ShowSelf(); }
private IEnumerator CorotineTwoLandFight(Land attackLand, Land defenceLand) { DicePanelParam attackLandParam = GetDicePanelParamByLand(attackLand, true); DicePanelParam defenceLandParam = GetDicePanelParamByLand(defenceLand, false); ShowDiceRollPanel(attackLandParam, defenceLandParam); //等界面关闭立即执行地块逻辑 yield return(new WaitWhile(() => { return _battleDicePanel.isActiveAndEnabled; })); //守方胜 if (_attackPoint <= _defencePoint) { DefenceVictory(attackLand); } else { AttackVictory(attackLand, defenceLand); } //一次进攻结束的回调 if (BATTLE_EVENT_FinishAttackOneLand != null) { BATTLE_EVENT_FinishAttackOneLand(); } }