示例#1
0
        public RebellionMapManager checkRebellionResult()
        {
            Hashtable           data   = RetentionData.GetData();
            RebellionMapManager result = null;

            if (data != null)
            {
                result = (data["rebellionMapManager"] as RebellionMapManager);
            }
            return(result);
        }
示例#2
0
        public IEnumerator RebellionResult(RebellionMapManager RmapManager, bool isWin, int areaID)
        {
            if (RmapManager != null)
            {
                mapCamera.MoveToTargetTile(areaID);
                yield return(new WaitForSeconds(0.5f));

                yield return(StartCoroutine(ShowRebellionResult(isWin, areaID)));

                yield return(null);
            }
        }
示例#3
0
        private void DecideSortieStart()
        {
            DebugUtils.Log("TaskRebellionOrganize", string.Empty);
            RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager();
            List <UIRebellionParticipatingFleetInfo> participatingFleetList             = _ctrlRebellionOrganize.participatingFleetSelector.participatingFleetList;
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo  = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo2 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattlePrimaryFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo3 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardSupportFleet);
            UIRebellionParticipatingFleetInfo        uIRebellionParticipatingFleetInfo4 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattleSupportFleet);

            int[] array = new int[4]
            {
                (!(uIRebellionParticipatingFleetInfo == null)) ? uIRebellionParticipatingFleetInfo.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo2 == null)) ? uIRebellionParticipatingFleetInfo2.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo3 == null)) ? uIRebellionParticipatingFleetInfo3.deckModel.Id : (-1),
                (!(uIRebellionParticipatingFleetInfo4 == null)) ? uIRebellionParticipatingFleetInfo4.deckModel.Id : (-1)
            };
            bool flag = rebellionManager.IsGoRebellion(array[0], array[1], array[2], array[3]);
            List <IsGoCondition> list  = null;
            List <IsGoCondition> list2 = null;

            if (array[2] != -1)
            {
                list = rebellionManager.IsValidMissionSub(array[2]);
            }
            if (array[3] != -1)
            {
                list2 = rebellionManager.IsValid_MissionMain(array[3]);
            }
            bool flag2 = list == null || (list != null && list.Count == 0);
            bool flag3 = list2 == null || (list2 != null && list2.Count == 0);

            if (flag && flag2 && flag3)
            {
                RebellionMapManager rebellionMapManager = rebellionManager.GoRebellion(array[0], array[1], array[2], array[3]);
                MapModel            map       = rebellionMapManager.Map;
                Hashtable           hashtable = new Hashtable();
                hashtable.Add("rebellionMapManager", rebellionMapManager);
                hashtable.Add("rootType", 0);
                hashtable.Add("shipRecoveryType", ShipRecoveryType.None);
                hashtable.Add("escape", false);
                RetentionData.SetData(hashtable);
                Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
                SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks();
                StartCoroutine(PlayTransition(map, uIRebellionParticipatingFleetInfo2.deckModel));
            }
            SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
        }
示例#4
0
        public static Hashtable GetRetentionDataFlagshipWreck(MapManager manager, ShipRecoveryType iRecovery)
        {
            Hashtable hashtable = new Hashtable();

            if (manager is SortieMapManager)
            {
                SortieMapManager value = manager as SortieMapManager;
                hashtable.Add("sortieMapManager", value);
                hashtable.Add("rootType", 1);
                hashtable.Add("shipRecoveryType", iRecovery);
            }
            else if (manager is RebellionMapManager)
            {
                RebellionMapManager value2 = manager as RebellionMapManager;
                hashtable.Add("rebellionMapManager", value2);
                hashtable.Add("rootType", 2);
                hashtable.Add("shipRecoveryType", iRecovery);
            }
            return(hashtable);
        }
        public static Hashtable GetRetentionDataAdvancingWithdrawalDC(MapManager manager, ShipRecoveryType iRecovery)
        {
            Hashtable hashtable = new Hashtable();

            if (manager is SortieMapManager)
            {
                SortieMapManager sortieMapManager = manager as SortieMapManager;
                hashtable.Add("sortieMapManager", sortieMapManager);
                hashtable.Add("rootType", 1);
                hashtable.Add("shipRecoveryType", iRecovery);
            }
            else if (manager is RebellionMapManager)
            {
                RebellionMapManager rebellionMapManager = manager as RebellionMapManager;
                hashtable.Add("rebellionMapManager", rebellionMapManager);
                hashtable.Add("rootType", 2);
                hashtable.Add("shipRecoveryType", iRecovery);
            }
            return(hashtable);
        }
示例#6
0
        public static Hashtable GetRetentionDataMapOpen(MapManager manager, BattleResultModel model)
        {
            Hashtable hashtable = new Hashtable();

            if (manager is SortieMapManager)
            {
                SortieMapManager value = manager as SortieMapManager;
                hashtable.Add("sortieMapManager", value);
                hashtable.Add("newOpenAreaIDs", model.NewOpenAreaIDs);
                hashtable.Add("newOpenMapIDs", model.NewOpenMapIDs);
                hashtable.Add("rootType", 1);
            }
            else if (manager is RebellionMapManager)
            {
                RebellionMapManager value2 = manager as RebellionMapManager;
                hashtable.Add("rebellionMapManager", value2);
                hashtable.Add("newOpenAreaIDs", model.NewOpenAreaIDs);
                hashtable.Add("newOpenMapIDs", model.NewOpenMapIDs);
                hashtable.Add("rootType", 2);
            }
            return(hashtable);
        }
        private IEnumerator OneDeckGoSortie()
        {
            RebellionManager mng         = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager();
            List <DeckModel> enableDecks = deckInfoManager.GetSortieEnableDeck(AreaDecks);

            if (enableDecks.Count != 1)
            {
            }
            DeckModel deck = enableDecks[0];

            if (mng.IsGoRebellion(-1, deck.Id, -1, -1))
            {
                StartCoroutine(OpenConfirmDialog(deck));
                GoSortieConfirm.Initialize(deck, isConfirm: true);
                GoSortieConfirm.SetPushYesButton(delegate
                {
                    this.StrategyDialog.CloseDialog();
                    this.StrategyDialog.setCloseAction(delegate
                    {
                        RebellionMapManager rebellionMapManager = mng.GoRebellion(-1, deck.Id, -1, -1);
                        MapModel map = rebellionMapManager.Map;
                        RetentionData.SetData(new Hashtable
                        {
                            {
                                "rebellionMapManager",
                                rebellionMapManager
                            },
                            {
                                "rootType",
                                0
                            },
                            {
                                "shipRecoveryType",
                                ShipRecoveryType.None
                            },
                            {
                                "escape",
                                false
                            }
                        });
                        Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
                        this.StartCoroutine(this.PlayTransition(map, deck));
                    });
                });
                GoSortieConfirm.SetPushNoButton(delegate
                {
                    this.StrategyDialog.CloseDialog();
                    this.StrategyDialog.setCloseAction(delegate
                    {
                        this.StartCoroutine(this.NonDeckLose());
                    });
                });
            }
            else
            {
                if (AreaDecks.Count != 1)
                {
                    SingletonMonoBehaviour <AppInformation> .Instance.SlogDraw = true;
                }
                StartCoroutine(NonDeckLose());
            }
            yield return(null);
        }