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); } }
public bool Run() { if (!this._isDecide && this._isInputPossible) { using (List <UIHexButton> .Enumerator enumerator = this._listHexBtns.GetEnumerator()) { while (enumerator.MoveNext()) { UIHexButton current = enumerator.get_Current(); current.Run(); } } if (this._clsInput.keyState.get_Item(14).down) { this._btnIndex = this._setButtonIndex(true); KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); } else if (this._clsInput.keyState.get_Item(10).down) { this._btnIndex = this._setButtonIndex(false); KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); } else if (this._clsInput.GetDown(KeyControl.KeyName.MARU)) { this.DecideAdvancingWithDrawalBtn(this._listHexBtns.get_Item(this._btnIndex)); } } return(!this._isDecide); }
public bool Run() { KeyControl keyControl = BattleTaskManager.GetKeyControl(); if (!this._isDecide && this._isInputPossible) { using (List <UIHexButton> .Enumerator enumerator = this._listHexBtns.GetEnumerator()) { while (enumerator.MoveNext()) { UIHexButton current = enumerator.get_Current(); current.Run(); } } if (keyControl.GetDown(KeyControl.KeyName.LEFT)) { this._btnIndex = this._setButtonIndex(this._btnIndex, false); KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); } if (keyControl.GetDown(KeyControl.KeyName.RIGHT)) { this._btnIndex = this._setButtonIndex(this._btnIndex, true); KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); } if (keyControl.GetDown(KeyControl.KeyName.MARU)) { this.DecideAdvancingWithDrawalBtn(this._listHexBtns.get_Item(this._btnIndex)); } } return(!this._isDecide); }
private void DecideAdvancingWithDrawalBtn(UIHexButton btn) { ShipModel_BattleAll shipModel_BattleAll = BattleTaskManager.GetBattleManager().Ships_f[0]; if (btn.index == 1 && !shipModel_BattleAll.HasRecoverYouin()) { return; } if (btn.index == 2 && !shipModel_BattleAll.HasRecoverMegami()) { return; } if (btn.index == 1 && this._btnIndex != btn.index) { this._btnIndex = btn.index; KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); return; } if (btn.index == 2 && this._btnIndex != btn.index) { this._btnIndex = btn.index; KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); return; } if (btn.index == 0 && this._btnIndex != btn.index) { this._btnIndex = btn.index; KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove); this.SetAdvancingWithdrawalBtnState(this._btnIndex); return; } 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); UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation; battleNavigation.Hide(0.2f, null); if (this._delDecideAdvancingWithdrawalButton != null) { this._delDecideAdvancingWithdrawalButton(btn); } }
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); } }); } }
public static AsyncOperation GetNextLoadLevelAsync(UIHexButton btn) { return((btn.index != 1) ? Application.LoadLevelAsync(Generics.Scene.Strategy.ToString()) : Application.LoadLevelAsync(Generics.Scene.SortieAreaMap.ToString())); }