Ejemplo n.º 1
0
 public void Play(DelDecideAdvancingWithdrawalButton decideCallback)
 {
     this._delDecideAdvancingWithdrawalButton = decideCallback;
     base.Init();
     this._setShipTexture();
     this._setLabel();
     this._btnIndex = 0;
     this._listIsBtn.set_Item(0, true);
     this._uiSmoke.SetActive(true);
     this._uiSmoke.Play();
     this._listHexBtns.ForEach(delegate(UIHexButton x)
     {
         x.SetActive(true);
         x.Play(UIHexButton.AnimationList.HexButtonShow, delegate
         {
             if (this._isBattleCut)
             {
                 UIBattleCutNavigation navigation = BattleCutManager.GetNavigation();
                 navigation.SetNavigationInEscortShipEvacuation();
                 navigation.Show(0.2f, null);
             }
             else
             {
                 UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation;
                 battleNavigation.SetNavigationInEscortShipEvacuation();
                 battleNavigation.Show(0.2f, null);
             }
             this._isInputPossible = true;
             this.SetAdvancingWithdrawalBtnState(this._btnIndex);
         });
     });
 }
Ejemplo n.º 2
0
 private void DecideAdvancingWithDrawalBtn(UIHexButton btn)
 {
     if (this._isDecide)
     {
         return;
     }
     this._isDecide = true;
     KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_036);
     this._listHexBtns.ForEach(delegate(UIHexButton x)
     {
         x.isColliderEnabled = false;
     });
     this.SetAdvancingWithdrawalBtnState(btn.index);
     if (this._isBattleCut)
     {
         UIBattleCutNavigation navigation = BattleCutManager.GetNavigation();
         navigation.Hide(0.2f, null);
     }
     else
     {
         UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation;
         battleNavigation.Hide(0.2f, null);
     }
     if (this._delDecideAdvancingWithdrawalButton != null)
     {
         this._delDecideAdvancingWithdrawalButton(btn);
     }
 }
Ejemplo n.º 3
0
 public bool Run()
 {
     if (_isPlayMsg1)
     {
         _clsMessage1.Update();
         if (_clsMessage1.IsMessageEnd)
         {
             _clsMessage2.Play();
             _isPlayMsg1 = false;
             _isPlayMsg2 = true;
         }
     }
     if (_isPlayMsg2)
     {
         _clsMessage2.Update();
         if (_clsMessage2.IsMessageEnd)
         {
             if (_isBattleCut)
             {
                 UIBattleCutNavigation navigation = BattleCutManager.GetNavigation();
                 navigation.SetNavigationInFlagshipWreck();
                 navigation.Show(0.2f, null);
             }
             else
             {
                 UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation;
                 battleNavigation.SetNavigationInFlagshipWreck();
                 battleNavigation.Show(0.2f, null);
             }
             _isPlayMsg2 = false;
             _isControl  = true;
             _uiBackBtn.GetComponent <UISprite>().alpha = 1f;
             _uiBackBtn.transform.localPosition         = new Vector3(420f, -205f, 0f);
             _backBtnAnim.Play();
         }
     }
     if (_isFinished)
     {
         return(true);
     }
     if (!_isControl)
     {
         return(false);
     }
     if (_keyControl.keyState[1].down)
     {
         compFlagshipWreck();
     }
     return(false);
 }
 private void OnDestroy()
 {
     UserInterfacePortManager.ReleaseUtils.Releases(ref mTextures_Preload);
     UserInterfacePortManager.ReleaseUtils.Release(ref mPanelThis);
     mPracticeMenu   = null;
     mPracticeHeader = null;
     mTransform_PracticeDeckPlayer    = null;
     mPrefab_BattleCutManager         = null;
     mUIBattlePracticeManager         = null;
     mUIDeckPracticeManager           = null;
     mUIDeckPracticeProductionManager = null;
     mKeyController   = null;
     mPracticeManager = null;
     mOnBackCallBack  = null;
 }
Ejemplo n.º 5
0
        protected void UpdateMode()
        {
            if (_iModeReq == SortieBattleMode.SortieBattleMode_BEF)
            {
                return;
            }
            switch (_iModeReq)
            {
            case SortieBattleMode.SortieBattleMode_ST:
                if (_clsTasks.Open(_clsSortieMapTaskManager) < 0)
                {
                    return;
                }
                break;

            case SortieBattleMode.Battle:
                if (_clsBattleTaskManager == null)
                {
                    _clsBattleTaskManager = BattleTaskManager.Instantiate(((Component)_clsSortieBattlePrefabFile.prefabBattleTaskManager).GetComponent <BattleTaskManager>(), delegate(ShipRecoveryType x)
                    {
                        _iRecoveryType = x;
                        ReqMode(SortieBattleMode.SortieBattleMode_ST);
                        Mem.DelComponentSafe(ref _clsBattleTaskManager);
                    });
                    CheckDiscardSortieMapTaskManager();
                }
                break;

            case SortieBattleMode.BattleCut:
                if (_clsBattleCutManager == null)
                {
                    _clsBattleCutManager = BattleCutManager.Instantiate(((Component)GetSortieBattlePrefabFile().prefabBattleCutManager).GetComponent <BattleCutManager>(), Vector3.left * 20f);
                    _clsBattleCutManager.StartBattleCut(GetMapManager(), delegate
                    {
                        _clsSortieMapTaskManager.GetCamera().isCulling = true;
                    }, delegate(ShipRecoveryType x)
                    {
                        _iRecoveryType = x;
                        ReqMode(SortieBattleMode.SortieBattleMode_ST);
                        Mem.DelComponentSafe(ref _clsBattleCutManager);
                    });
                    CheckDiscardSortieMapTaskManager();
                }
                break;
            }
            _iMode    = _iModeReq;
            _iModeReq = SortieBattleMode.SortieBattleMode_BEF;
        }
Ejemplo n.º 6
0
 private void compFlagshipWreck()
 {
     if (_isControl)
     {
         _isFinished = true;
         _isControl  = false;
         if (_isBattleCut)
         {
             UIBattleCutNavigation navigation = BattleCutManager.GetNavigation();
             navigation.Hide(0.2f, null);
         }
         else
         {
             UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation;
             battleNavigation.Hide(0.2f, null);
         }
         Dlg.Call(ref _actCallback);
     }
 }
Ejemplo n.º 7
0
 protected bool IsCheckPhase(BattleCutPhase iPhase)
 {
     return((BattleCutManager.GetNowPhase() != iPhase) ? true : false);
 }
        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);
                });
            }
        }