private bool Init(Generics.BattleRootType type) { this._iType = type; this._btnIndex = 0; if (this._uiPanel == null) { this._uiPanel = base.GetComponent <UIPanel>(); } this._uiPanel.depth = 70; this._listHexBtns = new List <UIHexButton>(); this._listIsBtn = new List <bool>(); using (IEnumerator enumerator = Enum.GetValues(typeof(AdvancingWithdrawalDCType)).GetEnumerator()) { while (enumerator.MoveNext()) { AdvancingWithdrawalDCType advancingWithdrawalDCType = (AdvancingWithdrawalDCType)((int)enumerator.get_Current()); if (advancingWithdrawalDCType != AdvancingWithdrawalDCType.None) { this._listIsBtn.Add(false); this._listHexBtns.Add(base.get_transform().FindChild(string.Format("{0}Btn", advancingWithdrawalDCType.ToString())).GetComponent <UIHexButton>()); this._listHexBtns.get_Item((int)advancingWithdrawalDCType).Init(); this._listHexBtns.get_Item((int)advancingWithdrawalDCType).SetIndex((int)advancingWithdrawalDCType); this._listHexBtns.get_Item((int)advancingWithdrawalDCType).uiButton.onClick = Util.CreateEventDelegateList(this, "DecideAdvancingWithDrawalBtn", this._listHexBtns.get_Item((int)advancingWithdrawalDCType)); this._listHexBtns.get_Item((int)advancingWithdrawalDCType).isColliderEnabled = true; } } } this._uiFleetInfos.Init(new List <ShipModel_BattleAll>(BattleTaskManager.GetBattleManager().Ships_f)); this._uiFleetInfos.widget.alpha = 0f; return(true); }
private void ChangeFocus(AdvancingWithdrawalDCType iType) { this._listLabelButton.ForEach(delegate(UILabelButton x) { x.isFocus = (x.index == (int)iType); }); }
private void OnActive(AdvancingWithdrawalDCType iType) { if (this._iSelectType != iType) { this._iSelectType = iType; this.ChangeFocus(this._iSelectType); } }
private void OnActive(AdvancingWithdrawalDCType iType) { if (_iSelectType != iType) { _iSelectType = iType; ChangeFocus(_iSelectType); } }
private void PreparaNext(bool isFoward) { AdvancingWithdrawalDCType iSelectType = this._iSelectType; this._iSelectType = (AdvancingWithdrawalDCType)Mathe.NextElement((int)this._iSelectType, 0, 2, isFoward, (int x) => this._listLabelButton.get_Item(x).isValid); if (iSelectType != this._iSelectType) { this.ChangeFocus(this._iSelectType); } }
private void PreparaNext(bool isFoward) { AdvancingWithdrawalDCType iSelectType = _iSelectType; _iSelectType = (AdvancingWithdrawalDCType)Mathe.NextElement((int)_iSelectType, 0, 2, isFoward, (int x) => _listLabelButton[x].isValid); if (iSelectType != _iSelectType) { ChangeFocus(_iSelectType); } }
public static ShipRecoveryType GetShipRecoveryType(AdvancingWithdrawalDCType iType) { if (iType == AdvancingWithdrawalDCType.Youin) { return(ShipRecoveryType.Personnel); } if (iType != AdvancingWithdrawalDCType.Megami) { return(ShipRecoveryType.None); } return(ShipRecoveryType.Goddes); }
public static ShipRecoveryType GetShipRecoveryType(AdvancingWithdrawalDCType iType) { switch (iType) { case AdvancingWithdrawalDCType.Megami: return(ShipRecoveryType.Goddes); case AdvancingWithdrawalDCType.Youin: return(ShipRecoveryType.Personnel); default: return(ShipRecoveryType.None); } }
private bool Init(ShipModel_BattleAll flagShip, Generics.BattleRootType iRootType) { this._clsShipModel = flagShip; this.panel.alpha = 0f; this.SetLabelPos(iRootType); this._iSelectType = AdvancingWithdrawalDCType.Withdrawal; int cnt = 0; this._listLabelButton.ForEach(delegate(UILabelButton x) { bool isValid = true; if (cnt == 2) { isValid = flagShip.HasRecoverMegami(); } else if (cnt == 1) { isValid = flagShip.HasRecoverYouin(); } else if (cnt == 3) { isValid = BattleCutManager.GetBattleManager().ChangeableDeck; } x.Init(cnt, isValid, KCVColor.ConvertColor(110f, 110f, 110f, 255f), KCVColor.ConvertColor(110f, 110f, 110f, 128f)); x.isFocus = false; x.toggle.group = 20; x.toggle.set_enabled(false); x.toggle.onDecide = delegate { this.Decide(); }; x.toggle.onActive = Util.CreateEventDelegateList(this, "OnActive", (AdvancingWithdrawalDCType)x.index); if (x.index == 0) { x.toggle.startsActive = true; } cnt++; }); this.ChangeFocus(this._iSelectType); return(true); }
private void OnDecideAdvancingWithdrawal(AdvancingWithdrawalDCType iType, ShipRecoveryType iRecoveryType) { RetentionData.SetData(BattleUtils.GetRetentionDataAdvancingWithdrawalDC(BattleCutManager.GetMapManager(), iRecoveryType)); switch (iType) { case AdvancingWithdrawalDCType.Withdrawal: if (SingletonMonoBehaviour <FadeCamera> .Instance != null) { SingletonMonoBehaviour <FadeCamera> .Instance.SetActive(isActive : true); SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate { Mst_DataManager.Instance.PurgeUIBattleMaster(); SingletonMonoBehaviour <FadeCamera> .Instance.isDrawNowLoading = false; SingletonMonoBehaviour <AppInformation> .Instance.NextLoadScene = Generics.Scene.Strategy; Application.LoadLevel(Generics.Scene.LoadingScene.ToString()); }); } break; case AdvancingWithdrawalDCType.Youin: case AdvancingWithdrawalDCType.Megami: TrophyUtil.Unlock_At_GoNext(); BattleCutManager.EndBattleCut(iRecoveryType); break; case AdvancingWithdrawalDCType.AdvancePrimary: BattleCutManager.GetMapManager().ChangeCurrentDeck(); BattleCutManager.EndBattleCut(iRecoveryType); break; } SingletonMonoBehaviour <SoundManager> .Instance.soundVolume.BGM = BattleDefines.SOUND_KEEP.BGMVolume; SingletonMonoBehaviour <SoundManager> .Instance.rawBGMVolume = BattleDefines.SOUND_KEEP.BGMVolume; Object.Destroy(_prodBCAdvancingWithdrawalDC.gameObject); Mem.Del(ref _prodBCAdvancingWithdrawalDC); }