Exemple #1
0
        private IEnumerator Startup(IObserver <bool> observer)
        {
            if (!App.isMasterInit)
            {
                yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());
            }
            MapManager mm = null;

            if (RetentionData.GetData() != null)
            {
                mm = ((!RetentionData.GetData().ContainsKey("sortieMapManager")) ? ((MapManager)RetentionData.GetData()["rebellionMapManager"]) : ((MapManager)RetentionData.GetData()["sortieMapManager"]));
            }
            _clsSortieMapTaskManager.Startup((!(SingletonMonoBehaviour <MapTransitionCutManager> .Instance != null)) ? null : SingletonMonoBehaviour <MapTransitionCutManager> .Instance.GetPrefabAreaMap(), mm, OnSetMapManager);
            RetentionData.Release();
            Mst_DataManager.Instance.MakeUIBattleMaster(_clsMapManager.Map.MstId);
            yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());

            if (SingletonMonoBehaviour <MapTransitionCutManager> .Instance != null)
            {
                bool isWait = true;
                SingletonMonoBehaviour <MapTransitionCutManager> .Instance.Discard(delegate
                {
                    isWait = false;
                });

                while (isWait)
                {
                    yield return(new WaitForEndOfFrame());
                }
            }
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
        private void GetGoNextData()
        {
            ShipRecoveryType recovery = ShipRecoveryType.None;

            if (RetentionData.GetData().ContainsKey("shipRecoveryType"))
            {
                recovery = (ShipRecoveryType)(int)RetentionData.GetData()["shipRecoveryType"];
            }
            if ((int)RetentionData.GetData()["rootType"] == 0)
            {
                SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : false);

                UpdateUIMapManager();
                return;
            }
            UpdateUIMapManager();
            _uiMapManager.InitAfterBattle();
            if (SingletonMonoBehaviour <FadeCamera> .Instance.isFadeOut)
            {
                Observable.Timer(TimeSpan.FromSeconds(0.5)).Subscribe(delegate
                {
                    SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, delegate
                    {
                        GoNext(recovery);
                    });
                });
            }
        }
Exemple #3
0
        private static bool InitRebellionBattle()
        {
            BattleFormationKinds1 formation_id = (BattleFormationKinds1)(int)RetentionData.GetData()["formation"];

            _clsBattleManager = ((RebellionMapManager)SortieBattleTaskManager.GetMapManager()).BattleStart(formation_id);
            return(true);
        }
        private void GetGoNextData()
        {
            ShipRecoveryType recovery = ShipRecoveryType.None;

            if (RetentionData.GetData().ContainsKey("shipRecoveryType"))
            {
                recovery = (ShipRecoveryType)((int)RetentionData.GetData().get_Item("shipRecoveryType"));
            }
            if ((int)RetentionData.GetData().get_Item("rootType") == 0)
            {
                SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(false);

                this.UpdateUIMapManager();
            }
            else
            {
                this.UpdateUIMapManager();
                SortieMapTaskManager._uiMapManager.InitAfterBattle();
                if (SingletonMonoBehaviour <FadeCamera> .Instance.isFadeOut)
                {
                    Observable.Timer(TimeSpan.FromSeconds(0.5)).Subscribe(delegate(long _)
                    {
                        SingletonMonoBehaviour <FadeCamera> .Instance.FadeIn(0.2f, delegate
                        {
                            this.GoNext(recovery);
                        });
                    });
                }
            }
        }
Exemple #5
0
        private static bool InitPracticeBattle()
        {
            int enemy_deck_id = (int)RetentionData.GetData()["deckID"];
            BattleFormationKinds1 formation_id    = (BattleFormationKinds1)(int)RetentionData.GetData()["formation"];
            PracticeManager       practiceManager = RetentionData.GetData()["practiceManager"] as PracticeManager;

            _clsBattleManager = practiceManager.StartBattlePractice(enemy_deck_id, formation_id);
            return(true);
        }
Exemple #6
0
 public int[] getNewOpenArea()
 {
     int[] result = null;
     if (RetentionData.GetData() != null)
     {
         result = (int[])RetentionData.GetData()["newOpenAreaIDs"];
     }
     return(result);
 }
Exemple #7
0
        public RebellionMapManager checkRebellionResult()
        {
            Hashtable           data   = RetentionData.GetData();
            RebellionMapManager result = null;

            if (data != null)
            {
                result = (data["rebellionMapManager"] as RebellionMapManager);
            }
            return(result);
        }
Exemple #8
0
 private void SetStartupData()
 {
     if (RetentionData.GetData() != null)
     {
         Hashtable data = RetentionData.GetData();
         _clsData.Difficlty   = (DifficultKind)(int)data["difficulty"];
         _clsData.isInherit   = (data.ContainsKey("isInherit") ? true : false);
         _clsData.AdmiralName = ((!data.ContainsKey("isInherit")) ? string.Empty : App.GetTitleManager().UserName);
     }
     RetentionData.Release();
 }
 private void SetStartupData()
 {
     if (RetentionData.GetData() != null)
     {
         Hashtable data = RetentionData.GetData();
         StartupTaskManager._clsData.Difficlty   = (DifficultKind)((int)data.get_Item("difficulty"));
         StartupTaskManager._clsData.isInherit   = data.ContainsKey("isInherit");
         StartupTaskManager._clsData.AdmiralName = ((!data.ContainsKey("isInherit")) ? string.Empty : App.GetTitleManager().UserName);
     }
     RetentionData.Release();
 }
 private StartAt GetStartAt()
 {
     if (RetentionData.GetData() != null && RetentionData.GetData().Contains(SHARE_DATA_START_AT_KEY))
     {
         object obj = RetentionData.GetData()[SHARE_DATA_START_AT_KEY];
         if (obj == SHARE_DATA_START_AT_VALUE_ITEMLIST)
         {
             return(StartAt.ItemList);
         }
         if (obj == SHARE_DATA_START_AT_VALUE_ITEMSTORE)
         {
             return(StartAt.ItemStore);
         }
     }
     return(StartAt.ItemList);
 }
        private void Start()
        {
            this._SM       = SingletonMonoBehaviour <SoundManager> .Instance;
            this._instance = VitaSaveManager.Instance;
            this._instance.Open(this);
            this._Label_status = GameObject.Find("Label_status").GetComponent <UILabel>();
            this.BackScene     = Generics.Scene.PortTop;
            this._Set_Status(SaveLoad.Now_State.Idle);
            this._SceneName = Application.get_loadedLevelName();
            Debug.Log("Application.loadedLevelName: " + this._SceneName);
            Hashtable hashtable = null;

            if (RetentionData.GetData() != null)
            {
                hashtable = RetentionData.GetData();
            }
            if (hashtable == null || (int)hashtable.get_Item("rootType") != 1)
            {
                this._Set_Execute_Mode(SaveLoad.Execute_Mode.Save_Mode);
                if ((int)hashtable.get_Item("rootType") == 21)
                {
                    this.BackScene = Generics.Scene.Strategy;
                }
            }
            else
            {
                this._Set_Execute_Mode(SaveLoad.Execute_Mode.Load_Mode);
            }
            if (hashtable != null)
            {
                RetentionData.Release();
            }
            if (this._Execute_Mode == SaveLoad.Execute_Mode.Load_Mode)
            {
                DebugUtils.SLog("ロードを実行します");
                this._DO_LOAD();
            }
            else if (this._Execute_Mode == SaveLoad.Execute_Mode.Save_Mode)
            {
                Debug.Log("セーブを実行します");
                this._DO_SAVE();
                SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null, true, true);
            }
        }
Exemple #12
0
        private void Start()
        {
            _SM       = SingletonMonoBehaviour <SoundManager> .Instance;
            _instance = VitaSaveManager.Instance;
            _instance.Open(this);
            _Label_status = GameObject.Find("Label_status").GetComponent <UILabel>();
            BackScene     = Generics.Scene.PortTop;
            _Set_Status(Now_State.Idle);
            _SceneName = Application.loadedLevelName;
            Debug.Log("Application.loadedLevelName: " + _SceneName);
            Hashtable hashtable = null;

            if (RetentionData.GetData() != null)
            {
                hashtable = RetentionData.GetData();
            }
            if (hashtable == null || (int)hashtable["rootType"] != 1)
            {
                _Set_Execute_Mode(Execute_Mode.Save_Mode);
                if ((int)hashtable["rootType"] == 21)
                {
                    BackScene = Generics.Scene.Strategy;
                }
            }
            else
            {
                _Set_Execute_Mode(Execute_Mode.Load_Mode);
            }
            if (hashtable != null)
            {
                RetentionData.Release();
            }
            if (_Execute_Mode == Execute_Mode.Load_Mode)
            {
                DebugUtils.SLog("ロ\u30fcドを実行します");
                _DO_LOAD();
            }
            else if (_Execute_Mode == Execute_Mode.Save_Mode)
            {
                Debug.Log("セ\u30fcブを実行します");
                _DO_SAVE();
                SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null);
            }
        }
Exemple #13
0
        private void InitBattleData()
        {
            if (RetentionData.GetData() != null)
            {
                _iRootType = (Generics.BattleRootType)(int) RetentionData.GetData()["rootType"];
                switch (_iRootType)
                {
                case Generics.BattleRootType.SortieMap:
                    InitSortieBattle();
                    break;

                case Generics.BattleRootType.Practice:
                    InitPracticeBattle();
                    break;

                case Generics.BattleRootType.Rebellion:
                    InitRebellionBattle();
                    break;
                }
                RetentionData.Release();
            }
            SetSkyType(_clsBattleManager);
        }
    private IEnumerator Start()
    {
        UserInterfacePortManager.ReleaseUtils.OverwriteCheck();
        mStartAt = GetStartAt();
        Stopwatch stopWatch = new Stopwatch();

        stopWatch.Reset();
        stopWatch.Start();
        SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
        mKeyController           = new KeyControl();
        mAudioClip_SE002         = SoundFile.LoadSE(SEFIleInfos.SE_002);
        mAudioClip_CommonCancel1 = SoundFile.LoadSE(SEFIleInfos.CommonCancel1);
        mUIItemListManager.SetOnBackListener(OnItemListBack);
        mUIItemListManager.SetOnSwitchItemStoreListener(OnSwitchToItemStore);
        mUIItemListManager.SetKeyController(null);
        mUIItemStoreManager.SetOnBackListener(OnItemStoreBackListener);
        mUIItemStoreManager.SetOnSwitchItemListListener(OnSwitchToItemList);
        mUIItemStoreManager.SetKeyController(null);
        mUIItemAkashi.SetOnHiddenCallBack(OnAkashiHidenListener);
        int bgmId = 101;

        switch (mStartAt)
        {
        case StartAt.ItemList:
            mUIItemListManager.SetActive(isActive: true);
            mUIItemStoreManager.SetActive(isActive: false);
            mTransform_SwitchViewRoot.transform.localPosition = new Vector3(0f, 0f, 0f);
            bgmId = itemListManager.UserInfo.GetPortBGMId(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID);
            mUIItemListManager.Initialize(itemListManager);
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.CircleUpdateInfo(itemListManager);
            }
            break;

        case StartAt.ItemStore:
            mUIItemListManager.SetActive(isActive: false);
            mUIItemStoreManager.SetActive(isActive: true);
            mTransform_SwitchViewRoot.transform.localPosition = new Vector3(-960f, 0f, 0f);
            bgmId = itemStoreManager.UserInfo.GetPortBGMId(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID);
            mUIItemStoreManager.Initialize(itemStoreManager);
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.CircleUpdateInfo(itemStoreManager);
            }
            break;
        }
        mAudioClip_SceneBGM = SoundFile.LoadBGM((BGMFileInfos)bgmId);
        stopWatch.Stop();
        if (RetentionData.GetData() != null)
        {
            RetentionData.GetData().Clear();
        }
        for (int frame = 0; frame < stopWatch.Elapsed.Milliseconds / 60; frame++)
        {
            yield return(new WaitForEndOfFrame());
        }
        SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(delegate
        {
            SoundUtils.PlayBGM(this.mAudioClip_SceneBGM, isLoop: true);
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            this.mUIItemAkashi.SetKeyController(this.mKeyController);
            this.mUIItemAkashi.Show();
            this.mUIItemAkashi.SetClickable(clickable: true);
            this.DelayAction(0.2f, delegate
            {
                ShipUtils.PlayPortVoice(4);
            });
            this.ChangeState(State.Akashi, popStack: false);
        });
    }