Ejemplo n.º 1
0
 public void NextActionUnit()
 {
     if (Remaining_ORL.Count == 0)
     {
         return;
     }
     if (Remaining_SRL.Count == 0)
     {
         return;
     }
     if (_currentBattleUnit != null)
     {
         _currentBattleUnit.actionSign.gameObject.SetActive(false);
     }
     _currentBattleUnit = All_Array[0];
     All_Array.Remove(_currentBattleUnit);
     All_Array.Add(_currentBattleUnit);
     if (_currentBattleUnit.IsDead)
     {
         NextActionUnit();
         return;
     }
     if (_currentBattleUnit.ReadThisStateEnable(StateTag.Dizzy))
     {
         _currentBattleUnit.CheckStates();
         if (SDGameManager.Instance.isFastModeEnabled)
         {
             NextActionUnit();
         }
         return;
     }
     _currentBattleUnit.actionSign.gameObject.SetActive(true);
     _currentActionPanel = _currentBattleUnit.APC;
     checkCurrentUnitTag();
     //
     _currentBattleUnit.CheckStates();//计算角色状态对其影响
     if (_currentBattleUnit.IsDead)
     {
         NextActionUnit();
         return;//重新进行死亡判断
     }
     if (_currentBUType != SDConstants.CharacterType.Enemy)
     {
         if (SDDataManager.Instance.SettingData.isAutoBattle)
         {
             _currentActionPanel.chooseRandomSkillFromGroup();
             chooseAutoBattleTarget();
             handleAction();
         }
         else
         {
             SDGameManager.Instance.isUsingProp = false;
             //
             IsWaitingPlayerAction = true;
             //显示全部可用交互
             _currentActionPanel.showActionPanel();
             //UsingPropBtn.interactable = true;
             CancelBtn.interactable = true;
         }
     }
     else
     {
         _currentActionPanel.showActionPanel();
         _currentActionPanel.chooseASkillFromSkillGroup();
         chooseRandomHeroToAttack();
         handleAction();
     }
     currentTouchId   = -1;
     confirmSkillStep = 0;
 }