示例#1
0
 private bool Init(Generics.BattleRootType iType)
 {
     _isInputPossible = false;
     panel.alpha = 0f;
     _iRootType = iType;
     _iSelectType = AdvancingWithdrawalType.Withdrawal;
     SetEnabledBtns(iType);
     SetLabelPos(iType);
     int cnt = 0;
     _listLabelButton.ForEach(delegate(UILabelButton x)
     {
         x.Init(cnt, _listEnabledBtn[cnt], KCVColor.ConvertColor(110f, 110f, 110f, 255f), KCVColor.ConvertColor(110f, 110f, 110f, 128f));
         x.isFocus = false;
         x.toggle.group = 1;
         x.toggle.enabled = false;
         x.toggle.onDecide = delegate
         {
             DecideAdvancingWithDrawal();
         };
         x.toggle.onActive = Util.CreateEventDelegateList(this, "OnActive", (AdvancingWithdrawalType)x.index);
         if (x.index == 0)
         {
             x.toggle.startsActive = true;
         }
         cnt++;
     });
     ChangeFocus(_iSelectType);
     return true;
 }
示例#2
0
 private void ChangeFocus(AdvancingWithdrawalType iType)
 {
     _listLabelButton.ForEach(delegate(UILabelButton x)
     {
         x.isFocus = ((x.index == (int)iType) ? true : false);
     });
 }
示例#3
0
 private void OnActive(AdvancingWithdrawalType nIndex)
 {
     if (_iSelectType != nIndex)
     {
         _iSelectType = nIndex;
         ChangeFocus(_iSelectType);
     }
 }
 private void OnActive(AdvancingWithdrawalType nIndex)
 {
     if (this._iSelectType != nIndex)
     {
         this._iSelectType = nIndex;
         this.ChangeFocus(this._iSelectType);
     }
 }
示例#5
0
 private void PreparaNext(bool isFoward)
 {
     AdvancingWithdrawalType iSelectType = _iSelectType;
     _iSelectType = (AdvancingWithdrawalType)Mathe.NextElement((int)_iSelectType, 0, maxIndex, isFoward, (int x) => _listLabelButton[x].isValid);
     if (iSelectType != _iSelectType)
     {
         ChangeFocus(_iSelectType);
     }
 }
        private void PreparaNext(bool isFoward)
        {
            AdvancingWithdrawalType iSelectType = this._iSelectType;

            this._iSelectType = (AdvancingWithdrawalType)Mathe.NextElement((int)this._iSelectType, 0, this.maxIndex, isFoward, (int x) => this._listLabelButton.get_Item(x).isValid);
            if (iSelectType != this._iSelectType)
            {
                this.ChangeFocus(this._iSelectType);
            }
        }
        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);
        }