Exemplo n.º 1
0
 private void _onThalassocracyProdFinished()
 {
     if (_clsResultModel.NewOpenMapIDs.Length > 0)
     {
         _clsState.AddState(_initMapOpenProd, _updateMapOpenProd);
     }
     else if (_clsResultModel.SPoint > 0)
     {
         _clsState.AddState(_initStrategyPointProd, _updateStrategyPointProd);
     }
     else if (_clsResultModel.GetAreaRewardItems() != null)
     {
         _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet);
     }
     else
     {
         _clsState.AddState(_initChkNextCell, _updateChkNextCell);
     }
     _prodThalassocracy.Discard();
 }
        private IEnumerator CreateShortRewardGet(IObserver <bool> observer)
        {
            if (_clsResultModel.GetAreaRewardItems() == null)
            {
                observer.OnNext(value: false);
                observer.OnCompleted();
                yield break;
            }
            _prodShortRewardGet = ProdShortRewardGet.Instantiate(Resources.Load <ProdShortRewardGet>("Prefabs/Battle/Production/MapOpen/ProdShortRewardGet"), BattleCutManager.GetSharedPlase(), _clsResultModel.GetAreaRewardItems());
            yield return(new WaitForEndOfFrame());

            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Exemplo n.º 3
0
 protected override bool Init()
 {
     _clsResultModel = BattleTaskManager.GetBattleManager().GetBattleResult();
     _clsMapManager  = SortieBattleTaskManager.GetMapManager();
     _clsInput       = BattleTaskManager.GetKeyControl();
     _clsState       = new StatementMachine();
     if (BattleTaskManager.GetRootType() == Generics.BattleRootType.Rebellion)
     {
         if (_clsMapManager.IsNextFinal())
         {
             if (_clsResultModel.WinRank == BattleWinRankKinds.B || _clsResultModel.WinRank == BattleWinRankKinds.A || _clsResultModel.WinRank == BattleWinRankKinds.S)
             {
                 _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
             }
             else
             {
                 _clsState.AddState(_initChkNextCell, _updateChkNextCell);
             }
         }
         else
         {
             _clsState.AddState(_initChkNextCell, _updateChkNextCell);
         }
     }
     else if (_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
     }
     else if (!_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initMapClearProd, _updateMapClearProd);
     }
     else if (!_clsResultModel.FirstClear && _clsResultModel.NewOpenMapIDs.Length > 0)
     {
         _clsState.AddState(_initMapOpenProd, _updateMapOpenProd);
     }
     else if (_clsResultModel.SPoint > 0)
     {
         _clsState.AddState(_initStrategyPointProd, _updateStrategyPointProd);
     }
     else if (_clsResultModel.GetAreaRewardItems() != null)
     {
         _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet);
     }
     else
     {
         _clsState.AddState(_initChkNextCell, _updateChkNextCell);
     }
     return(true);
 }
 public override bool Init(object data)
 {
     _clsResultModel = BattleCutManager.GetBattleManager().GetBattleResult();
     _clsMapManger   = BattleCutManager.GetMapManager();
     _clsInput       = BattleCutManager.GetKeyControl();
     _clsState       = new StatementMachine();
     if (BattleCutManager.GetBattleType() == Generics.BattleRootType.Rebellion)
     {
         if (_clsMapManger.IsNextFinal())
         {
             if (_clsResultModel.WinRank == BattleWinRankKinds.B || _clsResultModel.WinRank == BattleWinRankKinds.A || _clsResultModel.WinRank == BattleWinRankKinds.S)
             {
                 _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
             }
             else
             {
                 ChkNextCell();
             }
         }
         else
         {
             ChkNextCell();
         }
     }
     else if (_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initThalassocracyProd, _updateThalassocracyProd);
     }
     else if (!_clsResultModel.FirstAreaClear && _clsResultModel.FirstClear)
     {
         _clsState.AddState(_initMapClearProd, _updateMapClearProd);
     }
     else if (!_clsResultModel.FirstClear && _clsResultModel.NewOpenMapIDs.Length > 0)
     {
         _clsState.AddState(InitMapOpen, UpdateMapOpen);
     }
     else if (_clsResultModel.GetAreaRewardItems() != null)
     {
         _clsState.AddState(InitShortRewardGet, UpdateShortRewardGet);
     }
     else
     {
         ChkNextCell();
     }
     return(false);
 }