| | |
| | | [SerializeField] protected Button btnSpeed; // 速度控制 |
| | | [SerializeField] protected Text textSpeed; // 速度显示 |
| | | [SerializeField] protected Button btnPass; // 跳过战斗 |
| | | [SerializeField] protected Button btnPause; // 暂停按钮 (BattleWin中的btnStop可对应此按钮) |
| | | |
| | | [Header("战斗UI组件")] |
| | | [SerializeField] protected TotalDamageDisplayer totalDamageDisplayer; // 伤害统计 |
| | |
| | | |
| | | if (btnPass != null) |
| | | btnPass.AddListener(OnClickPass); |
| | | |
| | | if (btnPause != null) |
| | | btnPause.AddListener(OnClickPause); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 暂停/继续 |
| | | /// </summary> |
| | | protected virtual void OnClickPause() |
| | | { |
| | | if (null == battleField) |
| | | return; |
| | | battleField.IsPause = !battleField.IsPause; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 跳过战斗 |
| | | /// </summary> |
| | | protected virtual void OnClickPass() |
| | |
| | | { |
| | | if (txtBattleRound != null) |
| | | { |
| | | txtBattleRound.text = string.Format("{0}/{1}", round, maxRound); |
| | | txtBattleRound.text = Language.Get("RoundText", round, maxRound); |
| | | } |
| | | } |
| | | |