Ejemplo n.º 1
0
        private void OnFormationSelected(BattleFormationKinds1 iFormation)
        {
            SortieMapTaskManager.GetUIShipCharacter().Hide(null);
            SortieMapTaskManager.GetUIAreaMapFrame().Hide();
            ProdSortieTransitionToBattle prodSortieTransitionToBattle = SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle;

            SortieBattleTaskManager.GetTransitionCamera().enabled = true;
            prodSortieTransitionToBattle.Play(delegate
            {
                Hashtable hashtable = new Hashtable();
                if (SortieBattleTaskManager.GetMapManager().GetType().Equals(typeof(RebellionMapManager)))
                {
                    hashtable.Add("rootType", Generics.BattleRootType.Rebellion);
                    hashtable.Add("rebellionMapManager", SortieBattleTaskManager.GetMapManager());
                }
                else
                {
                    hashtable.Add("rootType", Generics.BattleRootType.SortieMap);
                    hashtable.Add("sortieMapManager", SortieBattleTaskManager.GetMapManager());
                }
                hashtable.Add("formation", iFormation);
                RetentionData.SetData(hashtable);
                SortieBattleTaskManager.ReqMode(SortieBattleMode.Battle);
            });
        }
Ejemplo n.º 2
0
 private void DecideAdvancinsWithDrawalBtn(UIHexButtonEx btn)
 {
     if (btn.index == 2)
     {
         MapManager mapManager = SortieBattleTaskManager.GetMapManager();
         mapManager.ChangeCurrentDeck();
     }
     if (BattleTaskManager.IsSortieBattle() && SingletonMonoBehaviour <FadeCamera> .Instance != null)
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawal(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None));
             if (btn.index == 0)
             {
                 SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading  = false;
                 SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
                 Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
             }
             else
             {
                 SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = true;
                 Dlg.Call <ShipRecoveryType>(ref this._actOnGotoSortieMap, ShipRecoveryType.None);
             }
         });
     }
 }
Ejemplo n.º 3
0
 private bool _updateChkNextCell(object data)
 {
     if (!_clsMapManager.IsNextFinal())
     {
         if (BattleTaskManager.GetRootType() == Generics.BattleRootType.Rebellion && BattleTaskManager.GetBattleManager().ChangeableDeck&& BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverYouin() && !BattleTaskManager.GetBattleManager().Ships_f[0].HasRecoverMegami())
         {
             BattleTaskManager.ReqPhase(BattlePhase.AdvancingWithdrawal);
             return(true);
         }
         if (BattleTaskManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !ShipUtils.HasRepair(_clsResultModel.Ships_f[0]))
         {
             BattleTaskManager.ReqPhase(BattlePhase.FlagshipWreck);
             return(true);
         }
         BattleTaskManager.ReqPhase(BattlePhase.EscortShipEvacuation);
         return(true);
     }
     if (SingletonMonoBehaviour <FadeCamera> .Instance != null)
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             RetentionData.SetData(BattleUtils.GetRetentionDataMapOpen(SortieBattleTaskManager.GetMapManager(), _clsResultModel));
             SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
             Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
         });
     }
     return(true);
 }
        private void ChkNextCell()
        {
            if (!_clsMapManger.IsNextFinal())
            {
                if (BattleCutManager.GetBattleType() == Generics.BattleRootType.Rebellion && BattleCutManager.GetBattleManager().ChangeableDeck&& BattleCutManager.GetBattleManager().Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !BattleCutManager.GetBattleManager().Ships_f[0].HasRecoverMegami() && !BattleCutManager.GetBattleManager().Ships_f[0].HasRecoverYouin())
                {
                    BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal);
                }
                else if (_clsResultModel.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && !ShipUtils.HasRepair(_clsResultModel.Ships_f[0]))
                {
                    BattleCutManager.ReqPhase(BattleCutPhase.FlagshipWreck);
                }
                else
                {
                    BattleCutManager.ReqPhase(BattleCutPhase.EscortShipEvacuation);
                }
            }
            else if (SingletonMonoBehaviour <FadeCamera> .Instance != null)
            {
                SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true);

                SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
                SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
                {
                    SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume;
                    SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume    = BattleDefines.SOUND_KEEP.BGMVolume;
                    Mst_DataManager.Instance.PurgeUIBattleMaster();
                    RetentionData.SetData(BattleUtils.GetRetentionDataMapOpen(BattleCutManager.GetMapManager(), _clsResultModel));
                    SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
                    Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
                });
            }
        }
        private void _decideButton(int nIndex)
        {
            if (!(this.ShortCutBtnManager.ButtonManager.nowForcusButton.disabledSprite == this.ShortCutBtnManager.ButtonManager.nowForcusButton.hoverSprite))
            {
                this.isCloseAnimNow = true;
                if (PortObjectManager.isPrefabSecene(this._dicBtns.get_Item(nIndex).Scene) && !SingletonMonoBehaviour <PortObjectManager> .Instance.isLoadSecene())
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(this._dicBtns.get_Item(nIndex).Scene, false);
                }
                else
                {
                    if (this._dicBtns.get_Item(nIndex).Scene == Generics.Scene.SaveLoad)
                    {
                        Hashtable hashtable = new Hashtable();
                        hashtable.Add("rootType", Generics.Scene.Strategy);
                        RetentionData.SetData(hashtable);
                    }
                    SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(this._dicBtns.get_Item(nIndex).Scene);

                    this.CloseMenu();
                }
                return;
            }
            string mes = string.Empty;

            if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Count == 0)
            {
                CommonPopupDialog.Instance.StartPopup("艦隊を編成する必要があります");
                return;
            }
            if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.HasBling())
            {
                CommonPopupDialog.Instance.StartPopup("撤退中の艦が含まれています");
                return;
            }
            switch (this._dicBtns.get_Item(nIndex).Scene)
            {
            case Generics.Scene.Repair:
                mes = "この海域には入渠ドックがありません";
                break;

            case Generics.Scene.Arsenal:
                mes = "鎮守府海域でのみ選択可能です";
                break;

            case Generics.Scene.ImprovementArsenal:
                if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID != 1)
                {
                    mes = "鎮守府海域でのみ選択可能です";
                }
                else
                {
                    mes = "旗艦が工作艦である必要があります";
                }
                break;
            }
            CommonPopupDialog.Instance.StartPopup(mes);
        }
        private void OnPictureStoryShowConfirmCancel()
        {
            _clsState.Clear();
            Hashtable hashtable = new Hashtable();

            hashtable.Add("TutorialCancel", true);
            RetentionData.SetData(hashtable);
            OnPictureStoryShowFinished();
        }
 public void OnClickHouseButton()
 {
     if (isMoveable())
     {
         Hashtable hashtable = new Hashtable();
         hashtable.Add(UserInterfaceItemManager.SHARE_DATA_START_AT_KEY, UserInterfaceItemManager.SHARE_DATA_START_AT_VALUE_ITEMLIST);
         RetentionData.SetData(hashtable);
         SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(Generics.Scene.Item);
     }
 }
        private bool OnStartSortieStage()
        {
            mKeyController.IsRun = false;
            mKeyController.ClearKeyAll();
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            SingletonMonoBehaviour <Live2DModel> .Instance.forceStop();

            SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
            SingletonMonoBehaviour <NowLoadingAnimation> .Instance.isNowLoadingAnimation = true;
            SoundUtils.PlaySE(SEFIleInfos.CommonEnter3);
            DebugUtils.SLog("OnStartSortieStage1");
            mStageConfirm.Hide();
            DebugUtils.SLog("OnStartSortieStage2");
            DOTween.Sequence().Append(mRouletteSelector.transform.DOLocalMoveY(0f, 0.4f).SetEase(Ease.OutBounce)).Join(mRouletteSelector.transform.DOScale(new Vector3(1.6f, 1.6f, 1f), 0.3f));
            ShipUtils.PlayShipVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip(), App.rand.Next(13, 15));
            DebugUtils.SLog("OnStartSortieStage3");
            this.DelayAction(0.5f, delegate
            {
                DebugUtils.SLog("OnStartSortieStage mStageConfirm.ClickAnimation");
                MapModel mMapModel = mStageConfirm.mMapModel;
                RetentionData.SetData(new Hashtable
                {
                    {
                        "sortieMapManager",
                        mSortieManager.GoSortie(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id, mMapModel.MstId)
                    },
                    {
                        "rootType",
                        0
                    },
                    {
                        "shipRecoveryType",
                        ShipRecoveryType.None
                    },
                    {
                        "escape",
                        false
                    }
                });
                UnityEngine.Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
                UnityEngine.Object.Destroy(GameObject.Find("Information Root"));
                UnityEngine.Object.Destroy(GameObject.Find("OverView"));
                StartCoroutine(AsyncLoad());
                MapTransitionCutManager component = Util.Instantiate(mPrefab_MapTransitionCutManager.gameObject, base.transform.root.Find("Map Root").gameObject).GetComponent <MapTransitionCutManager>();
                component.transform.localPosition = mStrategyTopTaskManager.strategyCamera.transform.localPosition + new Vector3(-26.4f, -43f, 496.4f);
                component.Initialize(mMapModel, mAsyncOperation);
                TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial;
                SingletonMonoBehaviour <AppInformation> .Instance.NextLoadType = AppInformation.LoadType.Ship;
                DebugUtils.SLog("OnStartSortieStage mStageConfirm.ClickAnimation END");
            });
            DebugUtils.SLog("OnStartSortieStage4");
            return(false);
        }
 private void _onFlagshipWreckFinished()
 {
     if (BattleTaskManager.IsSortieBattle() && SingletonMonoBehaviour <FadeCamera> .Instance != null)
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             RetentionData.SetData(BattleUtils.GetRetentionDataFlagshipWreck(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None));
             SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
             Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
         });
     }
 }
Ejemplo n.º 10
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);
        }
Ejemplo n.º 11
0
        private IEnumerator LoadTutorial(DifficultKind difficultKind)
        {
            RetentionData.SetData(new Hashtable
            {
                {
                    "difficulty",
                    difficultKind
                }
            });
            AsyncOperation async = Application.LoadLevelAsync(Generics.Scene.Startup.ToString());

            async.allowSceneActivation = false;
            while (!App.isMasterInit)
            {
                yield return(new WaitForEndOfFrame());
            }
            async.allowSceneActivation = true;
        }
 public override bool Init(object data)
 {
     SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
     _prodFlagshipWreck = ProdFlagshipWreck.Instantiate(((Component)BattleCutManager.GetPrefabFile().prefabProdFlagshipWreck).GetComponent <ProdFlagshipWreck>(), BattleCutManager.GetSharedPlase(), BattleCutManager.GetBattleManager().Ships_f[0], BattleCutManager.GetMapManager().Deck, BattleCutManager.GetKeyControl(), isBattleCut: true);
     _prodFlagshipWreck.Play(delegate
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive: true);
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume;
             SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume    = BattleDefines.SOUND_KEEP.BGMVolume;
             Mst_DataManager.Instance.PurgeUIBattleMaster();
             SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false;
             RetentionData.SetData(BattleUtils.GetRetentionDataFlagshipWreck(BattleCutManager.GetMapManager(), ShipRecoveryType.None));
             Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
         });
     });
     return(false);
 }
Ejemplo n.º 13
0
        public static IEnumerator GotoLoadScene(IObserver <AsyncOperation> observer)
        {
            RetentionData.SetData(new Hashtable
            {
                {
                    "rootType",
                    Generics.Scene.Title
                }
            });
            AsyncOperation async = Application.LoadLevelAsync(Generics.Scene.SaveLoad.ToString());

            async.allowSceneActivation = false;
            while (!App.isMasterInit)
            {
                yield return(Observable.NextFrame(FrameCountType.EndOfFrame));
            }
            observer.OnNext(async);
            observer.OnCompleted();
        }
Ejemplo n.º 14
0
        private IEnumerator GotoNextScene()
        {
            _LoadingShip = GameObject.Find("UILoadingShip").GetComponent <UILoadingShip>();
            key.IsRun    = false;
            yield return(StartCoroutine(DifficultySelectExit()));

            yield return(new WaitForEndOfFrame());

            RetentionData.SetData(new Hashtable
            {
                {
                    "isInherit",
                    true
                },
                {
                    "difficulty",
                    diffculty
                }
            });
            Application.LoadLevel(Generics.Scene.Startup.ToString());
            yield return(null);
        }
        private void OnDecideAdvancingWithdrawal(AdvancingWithdrawalType iType)
        {
            switch (iType)
            {
            case AdvancingWithdrawalType.Withdrawal:
                if (SingletonMonoBehaviour <FadeCamera> .Instance != null)
                {
                    SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true);

                    SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
                    {
                        Mst_DataManager.Instance.PurgeUIBattleMaster();
                        RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawal(BattleCutManager.GetMapManager(), ShipRecoveryType.None));
                        SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading  = false;
                        SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
                        Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
                    });
                }
                break;

            case AdvancingWithdrawalType.Advance:
                BattleCutManager.EndBattleCut(ShipRecoveryType.None);
                break;

            case AdvancingWithdrawalType.AdvancePrimary:
            {
                MapManager mapManager = BattleCutManager.GetMapManager();
                mapManager.ChangeCurrentDeck();
                BattleCutManager.EndBattleCut(ShipRecoveryType.None);
                break;
            }
            }
            SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume;
            SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume    = BattleDefines.SOUND_KEEP.BGMVolume;
            Object.Destroy(_prodBCAdvancingWithdrawal.gameObject);
            Mem.Del(ref _prodBCAdvancingWithdrawal);
        }
Ejemplo n.º 16
0
        private void DecideAdvancinsWithDrawalBtn(UIHexButton btn)
        {
            BattleManager manager = BattleCutManager.GetBattleManager();

            if (btn.index == 0)
            {
                Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _)
                {
                    BattleCutManager.GetBattleManager().SendOffEscapes();
                    RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(BattleCutManager.GetMapManager(), ShipRecoveryType.None));
                    if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0]))
                    {
                        BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC);
                    }
                    else
                    {
                        BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal);
                    }
                });
            }
            else
            {
                Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate(long _)
                {
                    RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(BattleCutManager.GetMapManager(), ShipRecoveryType.None));
                    if (manager.Ships_f[0].DmgStateEnd == DamageState_Battle.Taiha && ShipUtils.HasRepair(manager.Ships_f[0]))
                    {
                        BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawalDC);
                    }
                    else
                    {
                        BattleCutManager.ReqPhase(BattleCutPhase.AdvancingWithdrawal);
                    }
                });
            }
        }
 private void DecideAdvancinsWithDrawalBtn(UIHexButton btn)
 {
     if (BattleTaskManager.IsSortieBattle())
     {
         SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = ((btn.index != 0) ? Generics.Scene.SortieAreaMap : Generics.Scene.Strategy);
         SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading  = ((SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene == Generics.Scene.SortieAreaMap) ? true : false);
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             if (btn.index == 1)
             {
                 TrophyUtil.Unlock_At_GoNext();
                 RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.Personnel));
                 Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.Personnel);
             }
             else if (btn.index == 2)
             {
                 TrophyUtil.Unlock_At_GoNext();
                 RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.Goddes));
                 Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.Goddes);
             }
             else if (btn.index == 3)
             {
                 MapManager mapManager = SortieBattleTaskManager.GetMapManager();
                 mapManager.ChangeCurrentDeck();
                 RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(mapManager, ShipRecoveryType.None));
                 Dlg.Call(ref _actOnGotoSortieMap, ShipRecoveryType.None);
             }
             else
             {
                 RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(SortieBattleTaskManager.GetMapManager(), ShipRecoveryType.None));
                 SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy;
                 Application.LoadLevel(Generics.Scene.LoadingScene.ToString());
             }
         });
     }
 }
Ejemplo n.º 18
0
        private void AreaMode()
        {
            int num  = Convert.ToInt32(AreaOpenNo.text);
            int num2 = Convert.ToInt32(MapOpenNo.text);

            if (AreaModeCursol)
            {
                cursol.transform.position = AreaOpenNo.transform.position;
            }
            else
            {
                cursol.transform.position = MapOpenNo.transform.position;
            }
            cursol.transform.localPosition += cursolOffset;
            if (keyController.keyState[10].down || keyController.keyState[14].down)
            {
                AreaModeCursol = !AreaModeCursol;
            }
            if (keyController.keyState[12].down)
            {
                if (AreaModeCursol)
                {
                    num--;
                }
                else
                {
                    num2--;
                }
            }
            if (keyController.keyState[8].down)
            {
                if (AreaModeCursol)
                {
                    num++;
                }
                else
                {
                    num2++;
                }
            }
            if (keyController.keyState[1].down)
            {
                if (AreaModeCursol)
                {
                    for (int i = 1; i < 7; i++)
                    {
                        Debug_Mod.OpenMapArea(num, i);
                    }
                }
                else
                {
                    Debug_Mod.OpenMapArea(num, num2);
                }
            }
            num             = Util.FixRangeValue(num, 1, 17, 1);
            num2            = Util.FixRangeValue(num2, 1, 5, 1);
            AreaOpenNo.text = num.ToString();
            MapOpenNo.text  = num2.ToString();
            if (StrategyTopTaskManager.GetLogicManager().SelectArea(num).Maps.Length > num2 - 1)
            {
                if (StrategyTopTaskManager.GetLogicManager().SelectArea(num).Maps[num2 - 1].Cleared)
                {
                    ClearState.text = "状態:クリア済み";
                }
                else
                {
                    ClearState.text = "状態:未クリア";
                }
            }
            else
            {
                ClearState.text = "マップが存在しません";
            }
            if (keyController.keyState[0].down)
            {
                Hashtable hashtable = new Hashtable();
                hashtable.Add("newOpenAreaIDs", openAreaIDs.ToArray());
                RetentionData.SetData(hashtable);
                ChangeMode(0);
            }
        }
Ejemplo n.º 19
0
    private IEnumerator GoSortie()
    {
        SortieManager sortieManager = new SortieManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.AreaId);
        MapModel      mapModel      = sortieManager.Maps[0];

        RetentionData.SetData(new Hashtable
        {
            {
                "sortieMapManager",
                sortieManager.GoSortie(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id, mapModel.MstId)
            },
            {
                "rootType",
                0
            },
            {
                "shipRecoveryType",
                ShipRecoveryType.None
            },
            {
                "escape",
                false
            }
        });
        Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
        Object.Destroy(GameObject.Find("Information Root"));
        Object.Destroy(GameObject.Find("OverView"));
        yield return(Application.LoadLevelAsync(Generics.Scene.SortieAreaMap.ToString()));

        while (Application.loadedLevelName != "SortieAreaMap")
        {
            yield return(StartCoroutine(WaitForCount("Wait For sortieareamap", 5)));
        }
        while (Application.loadedLevelName != "Strategy")
        {
            if ((bool)GameObject.Find("BattleStartBtn"))
            {
                GameObject.Find("BattleStartBtn").GetComponent <UIButton>().onClick[0].Execute();
            }
            if ((bool)GameObject.Find("SelectTouchesArea"))
            {
                GameObject.Find("SelectTouchesArea").SendMessage("OnClick");
            }
            if ((bool)GameObject.Find("NextBtn"))
            {
                GameObject.Find("NextBtn").SendMessage("OnClick");
            }
            if ((bool)GameObject.Find("GearBtn"))
            {
                GameObject.Find("GearBtn").SendMessage("OnClick");
            }
            if ((bool)GameObject.Find("WithdrawalHexExBtn"))
            {
                GameObject.Find("WithdrawalHexExBtn").GetComponent <UIWithdrawalButton>().OnDecide();
            }
            if ((bool)GameObject.Find("WithdrawalExBtn"))
            {
                GameObject.Find("WithdrawalExBtn").GetComponent <UIAdvancingWithDrawalButton>().OnDecide();
            }
            yield return(StartCoroutine(WaitForCount("Wait For Strategy", 3)));
        }
    }
Ejemplo n.º 20
0
        private void OnSelectedSceneListener(Generics.Scene selectedScene)
        {
            if (mStateManager.CurrentState != State.Menu)
            {
                return;
            }
            ChangeShipDepth(ShipDepth.Default);
            if (selectedScene != Generics.Scene.Option && selectedScene != Generics.Scene.Marriage && SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.ReqFrame(isScreenIn : false);
            }
            switch (selectedScene)
            {
            case Generics.Scene.Strategy:
                SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.3f, delegate
                {
                    UnLoadUnUsedAssets(delegate
                    {
                        SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(Generics.Scene.Strategy);
                    });
                });

                break;

            case Generics.Scene.Option:
                mStateManager.PushState(State.Option);
                break;

            case Generics.Scene.Marriage:
                mStateManager.PushState(State.MarriageConfirm);
                break;

            case Generics.Scene.SaveLoad:
            {
                Hashtable hashtable = new Hashtable();
                hashtable.Add("rootType", Generics.Scene.Port);
                RetentionData.SetData(hashtable);
                SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene);

                break;
            }

            case Generics.Scene.Arsenal:
                if (mDeckModel.GetFlagShip().ShipType == 19)
                {
                    mStateManager.PushState(State.ArsenalTypeSelect);
                }
                else
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(selectedScene);
                }
                break;

            case Generics.Scene.Item:
            case Generics.Scene.Interior:
            case Generics.Scene.Album:
                SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene);

                break;

            default:
                if (PortObjectManager.isPrefabSecene(selectedScene))
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(selectedScene);
                }
                else
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene);
                }
                break;
            }
        }
Ejemplo n.º 21
0
        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);
        }
        private IEnumerator OnCommitBattleStartCoroutine(BattlePracticeContext context)
        {
            yield return(new WaitForEndOfFrame());

            if (context.BattleStartType == BattlePracticeContext.PlayType.Battle)
            {
                mPracticeHeader.UpdateHeaderText(string.Empty);
                RetentionData.SetData(new Hashtable
                {
                    {
                        "rootType",
                        Generics.BattleRootType.Practice
                    },
                    {
                        "areaId",
                        SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID
                    },
                    {
                        "practiceManager",
                        mPracticeManager
                    },
                    {
                        "formation",
                        context.FormationType
                    },
                    {
                        "deckID",
                        context.TargetDeck.Id
                    }
                });
                yield return(new WaitForEndOfFrame());

                GameObject prefab = Resources.Load("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle") as GameObject;
                ProdSortieTransitionToBattle smokeProduction = ProdSortieTransitionToBattle.Instantiate(prefab.GetComponent <ProdSortieTransitionToBattle>(), base.transform);
                yield return(new WaitForEndOfFrame());

                bool animationFinished = false;
                smokeProduction.Play(delegate
                {
                    animationFinished = true;
                });
                while (!animationFinished)
                {
                    yield return(new WaitForEndOfFrame());
                }
                if (SingletonMonoBehaviour <PortObjectManager> .exist())
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.ManualRelease();

                    UnityEngine.Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject);
                    SingletonMonoBehaviour <PortObjectManager> .Instance = null;
                }
                yield return(new WaitForEndOfFrame());

                SingletonMonoBehaviour <AppInformation> .Instance.NextLoadType  = AppInformation.LoadType.White;
                SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Battle;
                Application.LoadLevel("LoadingScene");
            }
            else
            {
                mPracticeHeader.UpdateHeaderText(string.Empty);
                PracticeManager  practiceManager = new PracticeManager(context.FriendDeck.Id);
                BattleCutManager bcm             = BattleCutManager.Instantiate(mPrefab_BattleCutManager, new Vector3(20f, 0f));
                yield return(new WaitForEndOfFrame());

                bcm.StartBattleCut(practiceManager, context.TargetDeck.Id, context.FormationType, delegate
                {
                    SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(Generics.Scene.Strategy);
                });
            }
        }