private void BackToStrategy() { mFocusKeyController = null; UnityEngine.Object.Destroy(base.gameObject); StrategyTaskManager.SceneCallBack(); PortObjectManager.SceneChangeAct = null; }
private void ArrowAnimation(int fromAreaNo, int targetAreaNo) { ArrowInstance = Util.Instantiate(ArrowPrefab, StrategyTaskManager.GetMapRoot().gameObject).GetComponent <RebellionArrow>(); Vector3 fromTile = (!(FromTile != null) || fromAreaNo == 15 || fromAreaNo == 16 || fromAreaNo == 17) ? TargetTile.transform.parent.TransformPoint(TargetTile.transform.localPosition + new Vector3(185f, -106f)) : FromTile.transform.position; ArrowInstance.StartAnimation(fromTile, TargetTile.transform.position); }
public IEnumerator NonDeckLose() { Dictionary <int, MapAreaModel> area = StrategyTopTaskManager.GetLogicManager().Area; RebellionWinLoseAnimation winloseAnimation = Util.Instantiate(Resources.Load("Prefabs/StrategyPrefab/Rebellion/RebellionWinLose") as GameObject, StrategyTopTaskManager.Instance.UIModel.OverView.gameObject).GetComponent <RebellionWinLoseAnimation>(); yield return(winloseAnimation.StartAnimation(isWin: false)); int areaID = StrategyRebellionTaskManager.RebellionArea; Object.Destroy(winloseAnimation); bool isShipExist = StrategyTopTaskManager.GetLogicManager().Area[areaID].GetDecks().Length > 0; ShipModel fShip = null; if (isShipExist) { fShip = StrategyTopTaskManager.GetLogicManager().Area[areaID].GetDecks()[0].GetFlagShip(); } StrategyTopTaskManager.Instance.GetAreaMng().setShipMove(isShipExist, fShip); Dictionary <int, MapAreaModel> beforeAreas = StrategyTopTaskManager.GetLogicManager().Area; int[] beforeIDs = StrategyAreaManager.DicToIntArray(beforeAreas); StrategyTaskManager.GetStrategyRebellion().GetRebellionManager().NotGoRebellion(); StrategyTopTaskManager.CreateLogicManager(); if (Server_Common.Utils.IsGameOver()) { StrategyTopTaskManager.Instance.GameOver(); yield break; } Dictionary <int, MapAreaModel> afterAreas = StrategyTopTaskManager.GetLogicManager().Area; int[] afterIDs = StrategyAreaManager.DicToIntArray(afterAreas); StrategyTopTaskManager.Instance.GetAreaMng().MakeTogetherCloseTilesList(areaID, beforeIDs, afterIDs); setActiveRedMask(isActive: false); if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() != null) { StrategyTopTaskManager.Instance.UIModel.Character.ChangeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } StrategyTopTaskManager.Instance.ShipIconManager.setShipIconsState(); StartCoroutine(StrategyTopTaskManager.Instance.GetAreaMng().CloseArea(areaID, delegate { this.DelayActionCoroutine(this.StartCoroutine(this.ShowLoseGuide()), delegate { StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenIn(null); if (StrategyTopTaskManager.GetLogicManager().GetRebellionAreaList().Count > 0) { StrategyRebellionTaskManager.checkRebellionArea(); StrategyTaskManager.ReqMode(StrategyTaskManager.StrategyTaskManagerMode.Rebellion); } else { StrategyTopTaskManager.GetTurnEnd().isRebellion = false; SoundUtils.PlayBGM(BGMFileInfos.Strategy, isLoop: true); StrategyTaskManager.ReqMode(StrategyTaskManager.StrategyTaskManagerMode.StrategyTaskManagerMode_ST); } }); })); Close(); StrategyTaskManager.GetStrategyRebellion().Termination(); yield return(null); }
public bool Init(List <DeckModel> models, int initIndex, DelDecideRebellionOrganizeFleetSelector decideDelegate) { DebugUtils.Log("UIRebellionFleetSelector", string.Empty); this._listDeckModels = models; this._nSelectedIndex = initIndex; this._delDecideRebellionOrganizeFleetSelector = decideDelegate; this.SetFleetInfos(initIndex); using (IEnumerator enumerator = this._clsRouletteSelector.GetContainer().get_transform().GetEnumerator()) { while (enumerator.MoveNext()) { Transform transform = (Transform)enumerator.get_Current(); Object.Destroy(transform.get_gameObject()); } } int num = 0; using (List <DeckModel> .Enumerator enumerator2 = models.GetEnumerator()) { while (enumerator2.MoveNext()) { DeckModel current = enumerator2.get_Current(); this._listSelectorShips.Add(UIRebellionSelectorShip.Instantiate(this._prefabSelectorShip.GetComponent <UIRebellionSelectorShip>(), this._clsRouletteSelector.get_transform(), Vector3.get_zero(), current.GetFlagShip())); this._listSelectorShips.get_Item(num).get_transform().set_name("SelectorShips" + num); num++; } } this._clsRouletteSelector.Init(this); this._clsRouletteSelector.SetKeyController(StrategyTaskManager.GetStrategyRebellion().keycontrol); this._clsRouletteSelector.ScaleForce(0.3f, 1f); return(true); }
protected override bool Run() { this._clsInput.Update(); this._clsTasks.Run(); this.UpdateMode(); return(StrategyTaskManager.GetMode() == StrategyTaskManager.StrategyTaskManagerMode.StrategyTaskManagerMode_BEF || StrategyTaskManager.GetMode() == StrategyTaskManager.StrategyTaskManagerMode.Rebellion); }
private bool isValidSetDeck(RebellionFleetType iType, DeckModel model) { DebugUtils.Log("isValidSetDeck::" + iType); bool flag = !_uiParticipatingFleetSelector.IsAlreadySetFleet(_uiFleetSelector.nowSelectedDeck) && _uiFleetSelector.nowSelectedDeck.GetFlagShip() != null; RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); bool flag2 = false; List <IsGoCondition> list = null; switch (iType) { case RebellionFleetType.VanguardSupportFleet: list = rebellionManager.IsValidMissionSub(model.Id); break; case RebellionFleetType.DecisiveBattleSupportFleet: list = rebellionManager.IsValid_MissionMain(model.Id); break; } if (list == null || list.Count == 0) { flag2 = true; } else { CommonPopupDialog.Instance.StartPopup(Util.getCancelReason(list[0])); } return(flag && flag2); }
public void backToCommandMenu() { SoundUtils.PlaySE(SEFIleInfos.CommonCancel1); this.DelayActionFrame(1, delegate { MainPanel.SafeGetTweenAlpha(1f, 0f, 0.3f, 0f, UITweener.Method.Linear, UITweener.Style.Once, null, string.Empty); TweenAlpha component = MainPanel.GetComponent <TweenAlpha>(); StrategyTopTaskManager.GetSailSelect().moveCharacterScreen(isEnter: false, null); component.onFinished.Clear(); component.SetOnFinished(delegate { this.DelayAction(0.15f, delegate { MainPanel.SetActive(isActive: false); TransportPanel.SetActive(isActive: false); StrategyTopTaskManager.Instance.GetInfoMng().changeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); MainPanel.DestroyEscortOrganize(); this.DelayActionFrame(3, delegate { KeyControlManager.Instance.KeyController = CommandKeyController; StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.CommandMenu); StrategyTaskManager.SceneCallBack(); }); }); }); Close(); isInit = false; }); }
public bool Init() { SortPanelDepth(_nBaseDepth); _uiParticipatingFleetSelector.Init(DecideParticipatingFleetInfo, DecideSortieStart); RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); List <DeckModel> list = new List <DeckModel>(); for (int i = 0; i < rebellionManager.Decks.Count; i++) { if (rebellionManager.Decks[i].IsValidSortie().Count == 0) { list.Add(rebellionManager.Decks[i]); } } _uiFleetSelector.Init(list, 0, DecideFleetSelector); _uiFleetSelector.rouletteSelector.controllable = false; KeyControl keycontrol = StrategyTaskManager.GetStrategyRebellion().keycontrol; keycontrol.reset(); keycontrol.setMinMaxIndex(0, Enum.GetValues(typeof(RebellionFleetType)).Length); keycontrol.useDoubleIndex(0, _uiFleetSelector.fleetCnt - 1); base.transform.localScaleOne(); Show(); return(true); }
public static bool ChkStateRebellionTaskIsRun(StrategyRebellionTaskManagerMode iMode) { if (StrategyTaskManager.GetStrategyRebellion().GetMode() != StrategyRebellionTaskManagerMode.StrategyRebellionTaskManager_BEF) { return((StrategyTaskManager.GetStrategyRebellion().GetMode() == iMode) ? true : false); } return(true); }
private void CancelOrganize() { strategyDialog.CloseDialog(); strategyDialog.setCloseAction(delegate { DebugUtils.Log("TaskRebellionOrganize", string.Empty); Close(); StartCoroutine(StrategyTaskManager.GetStrategyRebellion().taskRebellionEvent.NonDeckLose()); }); }
protected override bool Run() { _clsInput.Update(); _clsTasks.Run(); UpdateMode(); if (StrategyTaskManager.GetMode() != StrategyTaskManager.StrategyTaskManagerMode.StrategyTaskManagerMode_BEF) { return((StrategyTaskManager.GetMode() == StrategyTaskManager.StrategyTaskManagerMode.Rebellion) ? true : false); } return(true); }
private IEnumerator OpenConfirmDialog(DeckModel deck) { yield return(new WaitForEndOfFrame()); StrategyDialog.disableBackTouch(); StrategyDialog.isUseDefaultKeyController = false; StrategyDialog.OpenDialog(2); StrategyTaskManager.GetStrategyRebellion().keycontrol.IsRun = false; StrategyDialog.setOpenAction(delegate { this.GoSortieConfirm.SetKeyController(new KeyControl()); }); }
private void DecideSortieStart() { DebugUtils.Log("TaskRebellionOrganize", string.Empty); RebellionManager rebellionManager = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); List <UIRebellionParticipatingFleetInfo> participatingFleetList = _ctrlRebellionOrganize.participatingFleetSelector.participatingFleetList; UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo2 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattlePrimaryFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo3 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.VanguardSupportFleet); UIRebellionParticipatingFleetInfo uIRebellionParticipatingFleetInfo4 = participatingFleetList.Find((UIRebellionParticipatingFleetInfo x) => x.type == RebellionFleetType.DecisiveBattleSupportFleet); int[] array = new int[4] { (!(uIRebellionParticipatingFleetInfo == null)) ? uIRebellionParticipatingFleetInfo.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo2 == null)) ? uIRebellionParticipatingFleetInfo2.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo3 == null)) ? uIRebellionParticipatingFleetInfo3.deckModel.Id : (-1), (!(uIRebellionParticipatingFleetInfo4 == null)) ? uIRebellionParticipatingFleetInfo4.deckModel.Id : (-1) }; bool flag = rebellionManager.IsGoRebellion(array[0], array[1], array[2], array[3]); List <IsGoCondition> list = null; List <IsGoCondition> list2 = null; if (array[2] != -1) { list = rebellionManager.IsValidMissionSub(array[2]); } if (array[3] != -1) { list2 = rebellionManager.IsValid_MissionMain(array[3]); } bool flag2 = list == null || (list != null && list.Count == 0); bool flag3 = list2 == null || (list2 != null && list2.Count == 0); if (flag && flag2 && flag3) { RebellionMapManager rebellionMapManager = rebellionManager.GoRebellion(array[0], array[1], array[2], array[3]); MapModel map = rebellionMapManager.Map; Hashtable hashtable = new Hashtable(); hashtable.Add("rebellionMapManager", rebellionMapManager); hashtable.Add("rootType", 0); hashtable.Add("shipRecoveryType", ShipRecoveryType.None); hashtable.Add("escape", false); RetentionData.SetData(hashtable); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks(); StartCoroutine(PlayTransition(map, uIRebellionParticipatingFleetInfo2.deckModel)); } SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); }
private IEnumerator GoNextSceneAtDeckNum(List <DeckModel> areaDecks) { yield return(StartCoroutine(PopupCantSortieDecksDialog(areaDecks))); if (SortieEnableDeckNum < 1) { StartCoroutine(NonDeckLose()); } else if (SortieEnableDeckNum == 1) { StartCoroutine(OneDeckGoSortie()); } else { StrategyTaskManager.GetStrategyRebellion().ReqMode(StrategyRebellionTaskManagerMode.Organize); } yield return(null); }
private void Start() { try { this.mCamera_CatchTouchEvent = StrategyTaskManager.GetOverViewCamera(); } catch (Exception) { Debug.LogError("Strategy's StaticMethod Called Exception ::[" + StackTraceUtility.ExtractStackTrace() + "]"); } this.mPracticeBattleTargetSelect.SetOnBackCallBack(new Action(this.OnCancelBattleTargetSelect)); this.mPracticeBattleTargetSelect.SetOnSelectedDeckListener(new Action <DeckModel, List <IsGoCondition> >(this.OnSelectedBattleTargetDeck)); this.mPracticeBattleTargetSelect.SetActive(false); this.mUIPracticeBattleStartProduction.SetOnAnimationFinishedListener(new Action <bool>(this.OnPracticeBattleStartProductionOnFinished)); this.mUIPracticeBattleStartProduction.SetActive(false); this.mPracticeBattleConfirm.SetOnCancelListener(new Action(this.OnCancelSelectedPracticeBattleConfirm)); this.mPracticeBattleConfirm.SetOnStartListener(new Action(this.OnStartSelectedPracticeBattleConfirm)); this.mPracticeBattleConfirm.SetActive(false); }
private void Start() { try { mCamera_CatchTouchEvent = StrategyTaskManager.GetOverViewCamera(); } catch (Exception) { UnityEngine.Debug.LogError("Strategy's StaticMethod Called Exception ::[" + StackTraceUtility.ExtractStackTrace() + "]"); } mPracticeBattleTargetSelect.SetOnBackCallBack(OnCancelBattleTargetSelect); mPracticeBattleTargetSelect.SetOnSelectedDeckListener(OnSelectedBattleTargetDeck); mPracticeBattleTargetSelect.SetActive(isActive: false); mUIPracticeBattleStartProduction.SetOnAnimationFinishedListener(OnPracticeBattleStartProductionOnFinished); mUIPracticeBattleStartProduction.SetActive(isActive: false); mPracticeBattleConfirm.SetOnCancelListener(OnCancelSelectedPracticeBattleConfirm); mPracticeBattleConfirm.SetOnStartListener(OnStartSelectedPracticeBattleConfirm); mPracticeBattleConfirm.SetActive(isActive: false); }
protected override bool Init() { this.DelayAction(1.5f, delegate { StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenOut(null); }); _prodRebellionStart = ProdRebellionStart.Instantiate(((Component)_prefabProdRebellionStart).GetComponent <ProdRebellionStart>(), StrategyTaskManager.GetOverView()); _prodRebellionAreaCheck = Util.Instantiate(_prefabProdAreaCheck, StrategyTaskManager.GetMapRoot().gameObject).GetComponent <ProdRebellionAreaCheck>(); _prodRebellionStart.Play(delegate { setActiveRedMask(isActive: true); }).Subscribe(delegate { _prodRebellionAreaCheck.Play(StrategyRebellionTaskManager.RebellionFromArea, StrategyRebellionTaskManager.RebellionArea, delegate { StartCoroutine(GoNextSceneAtDeckNum(StrategyTaskManager.GetStrategyRebellion().GetRebellionManager().Decks)); }); }).AddTo(base.gameObject); return(true); }
public bool Init(List <DeckModel> models, int initIndex, DelDecideRebellionOrganizeFleetSelector decideDelegate) { DebugUtils.Log("UIRebellionFleetSelector", string.Empty); _listDeckModels = models; _nSelectedIndex = initIndex; _delDecideRebellionOrganizeFleetSelector = decideDelegate; SetFleetInfos(initIndex); foreach (Transform item in _clsRouletteSelector.GetContainer().transform) { UnityEngine.Object.Destroy(item.gameObject); } int num = 0; foreach (DeckModel model in models) { _listSelectorShips.Add(UIRebellionSelectorShip.Instantiate(((Component)_prefabSelectorShip).GetComponent <UIRebellionSelectorShip>(), _clsRouletteSelector.transform, Vector3.zero, model.GetFlagShip())); _listSelectorShips[num].transform.name = "SelectorShips" + num; num++; } _clsRouletteSelector.Init(this); _clsRouletteSelector.SetKeyController(StrategyTaskManager.GetStrategyRebellion().keycontrol); _clsRouletteSelector.ScaleForce(0.3f, 1f); return(true); }
private bool UpdateDetailProcess(object data) { KeyControl keycontrol = StrategyTaskManager.GetStrategyRebellion().keycontrol; if (keycontrol.GetDown(KeyControl.KeyName.MARU)) { SetRebellionParticipatingFleet((RebellionFleetType)_uiParticipatingFleetSelector.nowIndex, _uiFleetSelector.nowSelectedDeck); ChangeState(RebellionOrganizeMode.Main); return(true); } if (keycontrol.GetDown(KeyControl.KeyName.BATU)) { SoundUtils.PlaySE(SEFIleInfos.CommonCancel2); ChangeState(RebellionOrganizeMode.Main); return(true); } if (keycontrol.GetDown(KeyControl.KeyName.SANKAKU)) { SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove2); ChangeState(RebellionOrganizeMode.Main); return(true); } return(false); }
protected override bool Init() { DebugUtils.Log("TaskRebellionOrganize", string.Empty); _ctrlRebellionOrganize = CtrlRebellionOrganize.Instantiate(((Component)prefabRebellionOrganizeCtrl).GetComponent <CtrlRebellionOrganize>(), StrategyTaskManager.GetOverView(), DecideSortieStart, DecideCancel); return(true); }
private IEnumerator OneDeckGoSortie() { RebellionManager mng = StrategyTaskManager.GetStrategyRebellion().GetRebellionManager(); List <DeckModel> enableDecks = deckInfoManager.GetSortieEnableDeck(AreaDecks); if (enableDecks.Count != 1) { } DeckModel deck = enableDecks[0]; if (mng.IsGoRebellion(-1, deck.Id, -1, -1)) { StartCoroutine(OpenConfirmDialog(deck)); GoSortieConfirm.Initialize(deck, isConfirm: true); GoSortieConfirm.SetPushYesButton(delegate { this.StrategyDialog.CloseDialog(); this.StrategyDialog.setCloseAction(delegate { RebellionMapManager rebellionMapManager = mng.GoRebellion(-1, deck.Id, -1, -1); MapModel map = rebellionMapManager.Map; RetentionData.SetData(new Hashtable { { "rebellionMapManager", rebellionMapManager }, { "rootType", 0 }, { "shipRecoveryType", ShipRecoveryType.None }, { "escape", false } }); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.gameObject); this.StartCoroutine(this.PlayTransition(map, deck)); }); }); GoSortieConfirm.SetPushNoButton(delegate { this.StrategyDialog.CloseDialog(); this.StrategyDialog.setCloseAction(delegate { this.StartCoroutine(this.NonDeckLose()); }); }); } else { if (AreaDecks.Count != 1) { SingletonMonoBehaviour <AppInformation> .Instance.SlogDraw = true; } StartCoroutine(NonDeckLose()); } yield return(null); }
private void Start() { this.strategyCamera = StrategyTaskManager.GetStrategyTop().strategyCamera; this.EnemyTex = base.get_transform().FindChild("Enemy").GetComponent <UITexture>(); this.EnemyTex.mainTexture = ShipUtils.LoadTexture(512, 9); }
private void Start() { strategyCamera = StrategyTaskManager.GetStrategyTop().strategyCamera; EnemyTex = ((Component)base.transform.FindChild("Enemy")).GetComponent <UITexture>(); EnemyTex.mainTexture = ShipUtils.LoadTexture(512, 9); }
private void OnPopStatePracticeTypeSelect() { mPracticeMenu.SetKeyController(null); TweenAlpha.Begin(base.gameObject, 0.2f, 0f); StrategyTaskManager.SceneCallBack(); }
private bool UpdateMainProcess(object data) { if (_isDecide) { return(true); } KeyControl keycontrol = StrategyTaskManager.GetStrategyRebellion().keycontrol; if (keycontrol.GetDown(KeyControl.KeyName.UP)) { _uiParticipatingFleetSelector.MovePrev(); } else if (keycontrol.GetDown(KeyControl.KeyName.DOWN)) { _uiParticipatingFleetSelector.MoveNext(); } else if (keycontrol.GetDown(KeyControl.KeyName.LEFT)) { _uiFleetSelector.rouletteSelector.MovePrev(); } else if (keycontrol.GetDown(KeyControl.KeyName.RIGHT)) { _uiFleetSelector.rouletteSelector.MoveNext(); } else if (keycontrol.GetDown(KeyControl.KeyName.MARU)) { _uiFleetSelector.rouletteSelector.Determine(); } else if (keycontrol.GetDown(KeyControl.KeyName.BATU)) { if (_actCalcelCallback != null) { _actCalcelCallback(); } } else if (keycontrol.GetDown(KeyControl.KeyName.SHIKAKU)) { if (!_uiParticipatingFleetSelector.isSortieStartFocus) { SoundUtils.PlaySE(SEFIleInfos.CommonCancel1); _uiParticipatingFleetSelector.SetFleetInfo((RebellionFleetType)_uiParticipatingFleetSelector.nowIndex, null); _uiParticipatingFleetSelector.ChkSortieStartState(); } } else if (keycontrol.GetDown(KeyControl.KeyName.SANKAKU)) { SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove2); DebugUtils.Log("RebellionOrganizeCtrl", $"[{_uiFleetSelector.nowSelectedDeck.Id}({_uiFleetSelector.nowSelectedDeck.Name})]{((_uiFleetSelector.nowSelectedDeck.GetFlagShip() == null) ? string.Empty : _uiFleetSelector.nowSelectedDeck.GetFlagShip().Name)}"); if (_uiFleetSelector.nowSelectedDeck.GetFlagShip() == null) { return(false); } _uiParticipatingFleetSelector.isColliderEnabled = false; _uiFleetSelector.isColliderEnabled = false; _uiFleetSelector.rouletteSelector.controllable = false; _uiFleetShipsList.Init(_uiFleetSelector.nowSelectedDeck); ChangeState(RebellionOrganizeMode.Detail); return(true); } return(false); }