public void ChangeDeck() { int id = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id; ShipModel[] ships = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDeck(id).GetShips(); this.DeckName.text = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Name; for (int i = 0; i < 6; i++) { if (i < ships.Length) { this.ShipBanners[i].get_transform().get_parent().SetActive(true); this.ShipBanners[i].SetShipData(ships[i]); this.HPLabels[i].text = ships[i].NowHp + " / " + ships[i].MaxHp; this.NameLabels[i].text = ships[i].Name; this.shipSupplyStates[i].setSupplyState(ships[i]); } else { this.ShipBanners[i].get_transform().get_parent().SetActive(false); } } }
private void OnDestroy() { this.ENSEI = null; this.EscortOrganize = null; this.mPrefab_UserInterfacePracticeManager = null; this.mUserInterfacePracticeManager = null; this.sttm = null; this.sailSelect = null; this.CommandMenu = null; this.LogicMng = null; this.ShipNumberLabel = null; this.areaModel = null; this.warningPanel = null; this.InfoRoot = null; this.MapRoot = null; this.OverView = null; this.OverSceneObject = null; this.StopExpeditionPanel = null; this.keyController = null; this.SwipeEvent = null; this.StopExpeditionPanel = null; }
private void OnDestroy() { ENSEI = null; EscortOrganize = null; mPrefab_UserInterfacePracticeManager = null; mUserInterfacePracticeManager = null; sttm = null; sailSelect = null; CommandMenu = null; LogicMng = null; ShipNumberLabel = null; areaModel = null; warningPanel = null; InfoRoot = null; MapRoot = null; OverView = null; OverSceneObject = null; StopExpeditionPanel = null; keyController = null; SwipeEvent = null; StopExpeditionPanel = null; }
public void changeFocus() { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck == null) { App.Initialize(); StrategyTopTaskManager.CreateLogicManager(); SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDeck(1); } int id = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id; if (this.isDisableDeck(id)) { this.DeckSelectCursol.get_transform().set_parent(this.OrganizeMessage.get_transform()); } else { this.DeckSelectCursol.get_transform().set_parent(this.allShipIcons[id - 1].get_transform()); } this.DeckSelectCursol.get_transform().set_localScale(Vector3.get_one()); this.DeckSelectCursol.get_transform().set_localPosition(Vector3.get_zero()); this.CursolSprite.ParentHasChanged(); }
private IEnumerator RebellionTutorialGuide(TutorialModel model) { bool TutorialFinished = false; if (SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckFirstTutorial(model, TutorialGuideManager.TutorialID.RebellionPreparation)) { int currentAreaID = StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID; int TargetAreaID = StrategyTopTaskManager.Instance.TileManager.GetColorChangedTileID(); StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenOut(null); StrategyTopTaskManager.GetSailSelect().isEnableCharacterEnter = false; if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } yield return(StrategyTopTaskManager.Instance.UIModel.MapCamera.MoveToTargetTile(TargetAreaID)); yield return(new WaitForSeconds(0.5f)); SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.RebellionPreparation, delegate { SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().OnClosed = delegate { TutorialFinished = true; }; }); while (!TutorialFinished) { yield return(new WaitForEndOfFrame()); } StrategyTopTaskManager.GetSailSelect().isEnableCharacterEnter = true; StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenIn(null); if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } yield return(StrategyTopTaskManager.Instance.UIModel.MapCamera.MoveToTargetTile(currentAreaID)); } }
public void changeFocus() { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck == null) { App.Initialize(); StrategyTopTaskManager.CreateLogicManager(); SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck = StrategyTopTaskManager.GetLogicManager().UserInfo.GetDeck(1); } int id = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.Id; if (isDisableDeck(id)) { DeckSelectCursol.transform.parent = OrganizeMessage.transform; } else { DeckSelectCursol.transform.parent = allShipIcons[id - 1].transform; } DeckSelectCursol.transform.localScale = Vector3.one; DeckSelectCursol.transform.localPosition = Vector3.zero; CursolSprite.ParentHasChanged(); }
public void pushMenuButton() { if (isChangeingDeck || StrategyTopTaskManager.Instance.UIModel.MapCamera.isMoving) { return; } if (!StrategyTopTaskManager.GetCommandMenu().isRun) { Debug.Log("Not CommandMenuMode return"); return; } if (!CommandMenu.isOpen) { Debug.Log("Not CommandMenu Open return"); return; } int num = areaModel.GetDecks().Length; bool flag; if (isMenuActive((MENU_NAME)keyController.Index)) { Debug.Log("PUSH"); flag = pushCommandMenuList[keyController.Index](); CommandMenu.menuParts[keyController.Index].setColider(isEnable: false); } else { flag = false; } if (flag) { SoundUtils.PlayOneShotSE(SEFIleInfos.CommonEnter1); } else { SoundUtils.PlayOneShotSE(SEFIleInfos.CommonCancel2); } }
public void OnTouch() { if (!StrategyTopTaskManager.GetSailSelect().isRun) { return; } ShipModel flagShip = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip(); if (flagShip == null) { CommonPopupDialog.Instance.StartPopup("艦隊が編成されていません"); return; } Initialize(flagShip); if (isShow) { Hide(); } else { Show(); } }
private void BackToSailSelect() { StrategyTopTaskManager.Instance.UIModel.HowToStrategy.isForceHide(); StrategyTopTaskManager.Instance.GetInfoMng().updateFooterInfo(isUpdateMaterial: true); dialogKeyController.IsRun = true; StrategyTopTaskManager.GetSailSelect().CloseCommonDialog(); StrategyTopTaskManager.Instance.setActiveStrategy(isActive: true); SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; SingletonMonoBehaviour <Live2DModel> .Instance.Enable(); ListParent.SetActive(isActive: false); if (CurrentDeck.GetFlagShip() == null) { StrategyTopTaskManager.GetSailSelect().SearchAndChangeDeck(isNext: false, isSeachLocalArea: false); StrategyTopTaskManager.Instance.UIModel.Character.ChangeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } UIRebellionOrgaizeShipBanner[] shipStates = ShipStates; foreach (UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner in shipStates) { uIRebellionOrgaizeShipBanner.UnsetFocus(); } FocusBanner = null; }
private void SetAllShipsLevel(int LV) { if (LV == 0) { return; } UserInfo = StrategyTopTaskManager.GetLogicManager().UserInfo; Dictionary <int, int> dictionary = Mst_DataManager.Instance.Get_MstLevel(shipTable: true); int num = 1; while (true) { int num2 = num; MemberMaxInfo memberMaxInfo = UserInfo.ShipCountData(); if (num2 < memberMaxInfo.NowCount + 1) { UserInfo.GetShip(num).AddExp(dictionary[LV] - UserInfo.GetShip(num).Exp); num++; continue; } break; } }
private bool CategorySelectMode() { keyController.SilentChangeIndex(SeachActiveIndex(keyController.Index, Category, keyController.prevIndexChangeValue == 1)); cursol.transform.position = Category[keyController.Index].transform.position; cursol.transform.localPosition += cursolOffset; if (keyController.keyState[1].down) { ChangeMode(keyController.Index + 1); } if (keyController.keyState[0].down) { rootPrefab.SetActive(false); SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.StrategyTopTaskManagerMode_ST); return(false); } if (keyController.keyState[3].down) { Live2DModel.__DEBUG_MotionNAME_Draw = !Live2DModel.__DEBUG_MotionNAME_Draw; CommonPopupDialog.Instance.StartPopup("モ\u30fcション名表示:" + Live2DModel.__DEBUG_MotionNAME_Draw); } return(true); }
private bool pushInfo() { if (!this.isInfoOpenEnable) { return(true); } this.CommandMenu.MenuExit(); this.currentMenu = TaskStrategyCommandMenu.MENU_NAME.INFO; StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.Info); this.keyController.IsRun = false; this.sceneChange = false; if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() != null && SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.MissionState == MissionStates.NONE) { ShipUtils.PlayShipVoice(SingletonMonoBehaviour <AppInformation> .Instance.FlagShipModel, 8); } StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenOut(null, false, false); StrategyTopTaskManager.GetAreaInfoTask().setExitAction(delegate { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.MissionState == MissionStates.NONE) { this.isInfoOpenEnable = false; StrategyTopTaskManager.Instance.UIModel.Character.moveCharacterX(StrategyTopTaskManager.Instance.UIModel.Character.getModelDefaultPosX(), 0.4f, delegate { this.isInfoOpenEnable = true; }); StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenIn(null, false, false); } else { StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenIn(delegate { this.isInfoOpenEnable = true; }, false, false); } }); return(true); }
private bool pushSally() { if (!this.validCheck(TaskStrategyCommandMenu.MENU_NAME.SALLY)) { return(false); } if (StrategyTopTaskManager.Instance.UIModel.MapCamera.GetComponent <iTween>() != null) { return(true); } this.CommandMenu.MenuExit(); StrategyTopTaskManager.Instance.ShipIconManager.SetVisible(false); StrategyTopTaskManager.Instance.GetAreaMng().tileRouteManager.HideRoute(); StrategyTopTaskManager.Instance.TileManager.SetVisible(false); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.MapSelect); StrategyTopTaskManager.GetSailSelect().moveCharacterScreen(false, null); this.sceneChange = false; this.currentMenu = TaskStrategyCommandMenu.MENU_NAME.SALLY; if (StrategyTopTaskManager.Instance.TutorialGuide6_2 != null) { StrategyTopTaskManager.Instance.TutorialGuide6_2.Hide(); } return(true); }
public void sailSelectFirstInit() { shipIconManager = StrategyTopTaskManager.Instance.ShipIconManager; infoManager = StrategyTopTaskManager.Instance.GetInfoMng(); areaManager = StrategyTopTaskManager.Instance.GetAreaMng(); TileFocusColor = new Color(25f, 227f, 143f, 1f); sttm = StrategyTaskManager.GetStrategyTop(); DeckSelectController = new KeyControl(0, StrategyTopTaskManager.GetLogicManager().UserInfo.DeckCount - 1); DeckSelectController.setChangeValue(0f, 1f, 0f, -1f); DeckSelectController.KeyInputInterval = 0.2f; DeckSelectController.SilentChangeIndex(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); Live2DModel = SingletonMonoBehaviour <Live2DModel> .Instance; int currentAreaID = SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID; KeyControlManager.Instance.KeyController.Index = currentAreaID; shipIconManager.setShipIcons(StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks()); SingletonMonoBehaviour <AppInformation> .Instance.prevStrategyDecks = null; FirstPlayVoice = delegate { StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); }; isEnableCharacterEnter = true; prevDeckID = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID; }
private void OnDestroy() { StrategyTopTaskManager.Instance = null; this.uiModel = null; StrategyTopTaskManager._clsCommandMenuTask = null; StrategyTopTaskManager._clsSailSelect = null; StrategyTopTaskManager._clsShipMove = null; StrategyTopTaskManager._clsMapSelect = null; StrategyTopTaskManager._clsDeploy = null; StrategyTopTaskManager._clsAreaInfo = null; StrategyTopTaskManager._clsDebug = null; StrategyTopTaskManager._clsTurnEnd = null; StrategyTopTaskManager.StrategyLogicManager = null; if (this.AlertToastCamera != null) { this.AlertToastCamera.SetActive(true); } this.AlertToastCamera = null; this.TutorialGuide6_1 = null; this.TutorialGuide6_2 = null; this.TutorialGuide8_1 = null; this.TutorialGuide9_1 = null; this.StartCor = null; }
public void Initialize(Vector3 origin, Vector3 target, RadingKind type) { base.get_transform().set_localPosition(origin); base.get_transform().set_localScale(Vector3.get_one()); base.get_transform().set_eulerAngles(Vector3.get_zero()); this.tex.alpha = 0f; if (type == RadingKind.AIR_ATTACK) { if (StrategyTopTaskManager.GetLogicManager().Turn >= 500) { this.tex.mainTexture = (Resources.Load("Textures/TileAnimations/item_up_e54") as Texture); this.tex.width = 60; this.tex.height = 60; } else { this.tex.mainTexture = (Resources.Load("Textures/TileAnimations/item_up_506_2") as Texture); this.tex.width = 50; this.tex.height = 100; } this.tex.alpha = 1f; base.get_transform().set_localScale(0.001f * Vector3.get_one()); iTween.ScaleTo(base.get_gameObject(), iTween.Hash(new object[] { "scale", Vector3.get_one(), "islocal", true, "time", 0.2f, "delay", 0.5f, "easeType", iTween.EaseType.easeInOutQuad })); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 0, "to", 1, "time", 0.05f, "delay", 0.5f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); iTween.MoveTo(base.get_gameObject(), iTween.Hash(new object[] { "path", new Vector3[] { origin, origin + 0.5f * (target - origin) + 50f * Vector3.get_down(), 1.2f * target - 0.2f * origin }, "islocal", true, "time", 1.2f, "easeType", iTween.EaseType.linear })); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 1, "to", 0, "time", 0.05f, "delay", 1.15f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); this.DelayAction(0.2f, delegate { SoundUtils.PlaySE(SEFIleInfos.BattleTookOffAircraft); }); } else if (type == RadingKind.SUBMARINE_ATTACK) { this.tex.mainTexture = (Resources.Load("Textures/TileAnimations/kouseki") as Texture); this.tex.MakePixelPerfect(); Vector3 vector = target - origin; base.get_transform().Rotate(Vector3.get_forward(), 57.2957764f * Mathf.Atan2(vector.y, vector.x)); base.get_transform().set_localScale(new Vector3(0.001f, 0.75f, 0.75f)); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 0, "to", 1, "time", 0.05f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); iTween.ScaleTo(base.get_gameObject(), iTween.Hash(new object[] { "scale", 0.75f * Vector3.get_one(), "islocal", true, "time", 0.4f, "easeType", iTween.EaseType.linear })); iTween.MoveTo(base.get_gameObject(), iTween.Hash(new object[] { "position", 0.8f * target + 0.2f * origin, "islocal", true, "time", 1, "easeType", iTween.EaseType.linear })); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 1, "to", 0, "time", 0.05f, "delay", 0.95f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); SoundUtils.PlaySE(SEFIleInfos.BattleTorpedo); } else { this.tex.mainTexture = (Resources.Load("Textures/TileAnimations/fire_5") as Texture); this.tex.MakePixelPerfect(); Vector3 vector2 = target - origin; base.get_transform().Rotate(Vector3.get_forward(), 57.2957764f * Mathf.Atan2(vector2.y, vector2.x)); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 0, "to", 1, "time", 0.05f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); iTween.MoveTo(base.get_gameObject(), iTween.Hash(new object[] { "position", target, "islocal", true, "time", 0.25f, "easeType", iTween.EaseType.linear })); iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[] { "from", 1, "to", 0, "time", 0.05f, "delay", 0.2f, "onupdate", "Alpha", "onupdatetarget", base.get_gameObject() })); SoundUtils.PlaySE(SEFIleInfos.SE_901); } }
private bool KeyAction() { if (DeckSelectController.IsChangeIndex) { bool isNext = (DeckSelectController.prevIndexChangeValue == 1) ? true : false; SearchAndChangeDeck(isNext, isSeachLocalArea: false); if (prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); if (StrategyTopTaskManager.Instance.UIModel.Character.shipModel != null) { StrategyTopTaskManager.GetSailSelect().moveCharacterScreen(isEnter: true, null); } } return(true); } if (StrategyAreaManager.sailKeyController.IsChangeIndex) { areaManager.UpdateSelectArea(StrategyAreaManager.sailKeyController.Index); } else if (DeckSelectController.keyState[1].down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() == null) { GotoOrganize(); } else { OpenCommandMenu(); } } else if (DeckSelectController.keyState[3].down) { if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShipCount() != 0) { if (prevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } uiGoSortieConfirm.SetKeyController(new KeyControl()); commonDialog.OpenDialog(2, DialogAnimation.AnimType.FEAD); uiGoSortieConfirm.Initialize(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck, isConfirm: false); commonDialog.setCloseAction(delegate { KeyControlManager.Instance.KeyController = DeckSelectController; if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }); SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } } else if (DeckSelectController.keyState[5].down) { SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize(); } else if (DeckSelectController.keyState[0].down) { areaManager.UpdateSelectArea(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID); } else if (DeckSelectController.keyState[2].down) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Hide(); } commonDialog.OpenDialog(4); commonDialog.keyController.IsRun = false; commonDialog.setOpenAction(delegate { commonDialog.keyController.IsRun = true; }); commonDialog.ShikakuButtonAction = delegate { Close(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.TurnEnd); StrategyTopTaskManager.GetTurnEnd().TurnEnd(); if (StrategyTopTaskManager.Instance.TutorialGuide8_1 != null) { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } StrategyTopTaskManager.Instance.TutorialGuide8_1.HideAndDestroy(); } }; commonDialog.BatuButtonAction = delegate { if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().Show(); } }; } return(true); }
private void makeSailSelectController() { sailKeyController = new KeyControl(1, 17); int[,] useIndexMap = new int[18, 8] { { 0, 0, 0, 0, 0, 0, 0, 0 }, { 8, 8, 8, 11, 7, 9, 9, 0 }, { 9, 7, 7, 0, 0, 0, 10, 10 }, { 13, 13, 13, 0, 12, 8, 8, 0 }, { 10, 10, 10, 0, 0, 0, 0, 0 }, { 11, 6, 6, 14, 14, 0, 7, 7 }, { 12, 17, 17, 0, 14, 5, 5, 11 }, { 1, 11, 11, 5, 5, 2, 2, 9 }, { 3, 3, 3, 12, 11, 1, 1, 0 }, { 1, 1, 1, 7, 2, 10, 10, 0 }, { 9, 9, 9, 2, 2, 4, 4, 0 }, { 8, 12, 12, 6, 5, 7, 7, 1 }, { 3, 0, 17, 17, 6, 11, 11, 8 }, { 0, 0, 15, 15, 3, 3, 3, 0 }, { 6, 16, 16, 0, 0, 0, 5, 5 }, { 13, 0, 0, 0, 16, 17, 17, 13 }, { 15, 0, 0, 0, 14, 14, 17, 17 }, { 15, 15, 15, 16, 16, 6, 6, 12 } }; sailKeyController.setUseIndexMap(useIndexMap); StrategyMapManager logicManager = StrategyTopTaskManager.GetLogicManager(); List <int> list = new List <int>(); for (int i = 1; i < logicManager.Area.Count; i++) { if (logicManager.Area[i].IsOpen()) { list.Add(i); } } sailKeyController.setEnableIndex(list.ToArray()); sailKeyController.Index = SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID; }
protected override void Start() { sttm = StrategyTaskManager.GetStrategyTop(); TaskSailSelect = StrategyTopTaskManager.GetSailSelect(); shipIconManager = StrategyTopTaskManager.Instance.ShipIconManager; }
private void backToCommandMenu() { this.AreaInfo.SetActive(false); this.ExitAction.Invoke(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.CommandMenu); }
private void backToCommandMenu() { AreaInfo.SetActive(false); ExitAction(); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.CommandMenu); }
protected override bool Init() { isAnimationStarted = false; mDisplaySwipeRegion.SetEventCatchCamera(mCamera); mDisplaySwipeRegion.SetOnSwipeActionJudgeCallBack(OnSwipeAction); Transform transform = mStageSelectRoot; Vector3 localPosition = mCamera.transform.localPosition; float x = localPosition.x; Vector3 localPosition2 = mCamera.transform.localPosition; transform.localPosition = new Vector3(x, localPosition2.y); mAreaId = StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID; mStrategyTopTaskManager = StrategyTaskManager.GetStrategyTop(); mIsFinishedAnimation = false; mMapModels = StrategyTopTaskManager.GetLogicManager().SelectArea(mAreaId).Maps; mSortieManager = StrategyTopTaskManager.GetLogicManager().SelectArea(mAreaId); mKeyController = new KeyControl(); mKeyController.isLoopIndex = true; mKeyController.IsRun = false; TweenAlpha.Begin(GameObject.Find("Information Root"), 0.3f, 0f); TweenAlpha.Begin(GameObject.Find("Map_BG"), 0.3f, 0f); GameObject gameObject = StrategyTopTaskManager.Instance.TileManager.Tiles[mAreaId].getSprite().gameObject; mTransform_AnimationTile = Util.Instantiate(gameObject, GameObject.Find("Map Root").gameObject, addParentPos: true).transform; mAnimation_MapObjects = ((Component)mTransform_StageCovers).GetComponent <Animation>(); StartCoroutine(StartSeaAnimationCoroutine()); IEnumerator routine = StartSeaAnimationCoroutine(); StartCoroutine(routine); mTransform_StageCovers.SetActive(isActive: true); ((Component)mTransform_StageCovers.Find("UIStageCovers")).GetComponent <UIWidget>().alpha = 0.001f; SelectedHexAnimation(delegate { StartCoroutine(InititalizeStageCovers(delegate { ((Component)mTransform_StageCovers).GetComponent <Animation>().Play("SortieAnimation"); ShowMaps(mMapModels); })); }); if (mAreaId == 2 || mAreaId == 4 || mAreaId == 5 || mAreaId == 6 || mAreaId == 7 || mAreaId == 10 || mAreaId == 14) { mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_sky") as Texture); mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.height = 91; mTexture_sallyBGcloudRefl.alpha = 0.25f; mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_sea") as Texture); mTexture_snow.mainTexture = null; } else if (mAreaId == 3 || mAreaId == 13) { mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_sky") as Texture); mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.height = 90; mTexture_sallyBGcloudRefl.alpha = 0.75f; mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_sea") as Texture); mTexture_snow.mainTexture = (Resources.Load("Textures/Strategy/sea3_snow") as Texture); } else if (mAreaId == 15 || mAreaId == 16 || mAreaId == 17) { mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_sky2") as Texture); mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.height = 120; mTexture_sallyBGcloudRefl.alpha = 0.25f; mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_sea") as Texture); mTexture_snow.mainTexture = null; } else { mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_sky") as Texture); mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_clouds") as Texture); mTexture_sallyBGcloudRefl.height = 140; mTexture_sallyBGcloudRefl.alpha = 0.25f; mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_sea") as Texture); mTexture_snow.mainTexture = null; } return(true); }
protected override bool Run() { this.keyController.Update(); if (!TaskStrategyDebug.isControl) { if (this.keyController.keyState.get_Item(0).down) { this.rootPrefab.SetActive(false); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.StrategyTopTaskManagerMode_ST); return(false); } return(true); } else { if (this.keyController.keyState.get_Item(1).down) { SoundUtils.PlaySE(SEFIleInfos.CommonEnter1); } this.setMag(); if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(5).press) { Application.LoadLevel(Generics.Scene.Ending.ToString()); } else if (this.keyController.keyState.get_Item(5).press&& this.keyController.keyState.get_Item(2).down) { App.isInvincible = !App.isInvincible; CommonPopupDialog.Instance.StartPopup("無敵モード" + App.isInvincible); } else if (this.keyController.keyState.get_Item(4).press&& this.keyController.keyState.get_Item(2).down) { for (int i = 1; i < 15; i++) { EscortDeckManager escortDeckManager = new EscortDeckManager(i); if (StrategyTopTaskManager.GetLogicManager().UserInfo.ShipCountData().NowCount > 300) { for (int j = 0; j < 300; j++) { if (StrategyTopTaskManager.GetLogicManager().UserInfo.GetShip(1 + j).IsInEscortDeck() == -1 && escortDeckManager.ChangeOrganize(6, 1 + j)) { break; } } } StrategyTopTaskManager.GetLogicManager().Deploy(i, 10, escortDeckManager); } CommonPopupDialog.Instance.StartPopup("自動配備しました"); } else if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(4).press) { CommonPopupDialog.Instance.StartPopup("ゲームクリア!!"); TaskStrategyDebug.ForceEnding = true; } else if (this.keyController.keyState.get_Item(6).down&& this.keyController.keyState.get_Item(3).press) { if (this.turnend == null) { this.turnend = base.StartCoroutine(this.TurnEndSpeed(3495)); } } else if (this.keyController.keyState.get_Item(6).press&& this.keyController.keyState.get_Item(2).press) { StrategyTopTaskManager.GetTurnEnd().DebugTurnEnd(); CommonPopupDialog.Instance.StartPopup(StrategyTopTaskManager.GetLogicManager().Turn.ToString()); } else if (this.keyController.keyState.get_Item(6).down) { StrategyTopTaskManager.Instance.GameOver(); this.keyController.firstUpdate = true; } else if (this.keyController.keyState.get_Item(3).down) { TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial; for (int k = 0; k < 20; k++) { tutorial.SetStepTutorialFlg(k); } for (int l = 0; l < 99; l++) { tutorial.SetKeyTutorialFlg(l); } if (SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide() != null) { SingletonMonoBehaviour <PortObjectManager> .Instance.GetTutorialGuide().HideAndDestroy(); } } if (this.keyController.keyState.get_Item(7).down&& this.keyController.keyState.get_Item(4).press) { GameObject.Find("SingletonObject").AddComponent <TEST_Voyage>().StartVoyage(); } if (this.keyController.keyState.get_Item(7).down&& this.keyController.keyState.get_Item(5).press) { Object.Destroy(GameObject.Find("Live2DRender").get_gameObject()); Object.Destroy(SingletonMonoBehaviour <PortObjectManager> .Instance.get_gameObject()); Object.Destroy(GameObject.Find("SingletonObject").get_gameObject()); this.DelayActionFrame(3, delegate { Application.LoadLevel("TestEmptyScene"); this.DelayAction(5f, delegate { Resources.UnloadUnusedAssets(); }); }); } if (this.keyController.keyState.get_Item(4).hold&& this.keyController.keyState.get_Item(5).hold) { if (base.get_gameObject().get_name() == "DebugMenuNormal") { this.DebugMenuNormal.SetActive(false); this.DebugMode1.SetActive(true); this.DebugMode3.SetActive(true); } else { this.DebugMenuNormal.SetActive(true); this.DebugMode1.SetActive(false); this.DebugMode3.SetActive(false); } StrategyTopTaskManager.SetDebug(this.AnotherMode); StrategyTopTaskManager.ReqMode(StrategyTopTaskManager.StrategyTopTaskManagerMode.Debug); return(false); } if (!Diagnostics.get_enableHUD() && this.keyController.keyState.get_Item(4).press&& this.keyController.keyState.get_Item(5).press&& this.keyController.keyState.get_Item(2).down) { Diagnostics.set_enableHUD(true); } return(this.ModeRun()); } }
protected override bool Run() { if (this.OverScene != TaskStrategyCommandMenu.Scene.NONE) { return(true); } if (this.StopExpeditionPanel != null) { return(true); } this.keyController.Update(); if (this.IndexChange != 0 && !this.keyController.IsChangeIndex) { this.keyController.Index += this.IndexChange; this.IndexChange = 0; } if (this.keyController.IsRightDown()) { StrategyTopTaskManager.GetSailSelect().DeckSelectController.Index++; StrategyTopTaskManager.GetSailSelect().SearchAndChangeDeck(true, true); if (StrategyTopTaskManager.GetSailSelect().PrevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { StrategyTopTaskManager.GetSailSelect().changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); this.DeckEnableCheck(); this.CommandMenu.setFocus(); } } else if (this.keyController.IsLeftDown()) { StrategyTopTaskManager.GetSailSelect().DeckSelectController.Index--; StrategyTopTaskManager.GetSailSelect().SearchAndChangeDeck(false, true); if (StrategyTopTaskManager.GetSailSelect().PrevDeckID != SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID) { StrategyTopTaskManager.GetSailSelect().changeDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); StrategyTopTaskManager.Instance.UIModel.Character.PlayVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); this.DeckEnableCheck(); this.CommandMenu.setFocus(); } } if (this.keyController.IsChangeIndex && !SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsFocus) { this.CommandMenu.moveCursol(); } if (this.keyController.keyState.get_Item(14).press || this.keyController.keyState.get_Item(10).press) { this.isChangeingDeck = true; } else { this.isChangeingDeck = false; } if (this.keyController.keyState.get_Item(1).down) { this.pushMenuButton(); } else if (this.keyController.keyState.get_Item(0).down) { this.currentMenu = TaskStrategyCommandMenu.MENU_NAME.SALLY; this.ExitCommandMenu(); } if (this.keyController.keyState.get_Item(5).down) { this.pushPort(); } return(this.sceneChange); }
private void SetRebellionPoint() { Debug_Mod.SetRebellionPoint(areaID, DebugRP); StrategyTopTaskManager.CreateLogicManager(); setTileColor(); }
public void Initialize(Vector3 origin, Vector3 target, RadingKind type) { base.transform.localPosition = origin; base.transform.localScale = Vector3.one; base.transform.eulerAngles = Vector3.zero; tex.alpha = 0f; switch (type) { case RadingKind.AIR_ATTACK: if (StrategyTopTaskManager.GetLogicManager().Turn >= 500) { tex.mainTexture = (Resources.Load("Textures/TileAnimations/item_up_e54") as Texture); tex.width = 60; tex.height = 60; } else { tex.mainTexture = (Resources.Load("Textures/TileAnimations/item_up_506_2") as Texture); tex.width = 50; tex.height = 100; } tex.alpha = 1f; base.transform.localScale = 0.001f * Vector3.one; iTween.ScaleTo(base.gameObject, iTween.Hash("scale", Vector3.one, "islocal", true, "time", 0.2f, "delay", 0.5f, "easeType", iTween.EaseType.easeInOutQuad)); iTween.ValueTo(base.gameObject, iTween.Hash("from", 0, "to", 1, "time", 0.05f, "delay", 0.5f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); iTween.MoveTo(base.gameObject, iTween.Hash("path", new Vector3[3] { origin, origin + 0.5f * (target - origin) + 50f * Vector3.down, 1.2f * target - 0.2f * origin }, "islocal", true, "time", 1.2f, "easeType", iTween.EaseType.linear)); iTween.ValueTo(base.gameObject, iTween.Hash("from", 1, "to", 0, "time", 0.05f, "delay", 1.15f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); this.DelayAction(0.2f, delegate { SoundUtils.PlaySE(SEFIleInfos.BattleTookOffAircraft); }); break; case RadingKind.SUBMARINE_ATTACK: { tex.mainTexture = (Resources.Load("Textures/TileAnimations/kouseki") as Texture); tex.MakePixelPerfect(); Vector3 vector2 = target - origin; base.transform.Rotate(Vector3.forward, 180f / (float)Math.PI * Mathf.Atan2(vector2.y, vector2.x)); base.transform.localScale = new Vector3(0.001f, 0.75f, 0.75f); iTween.ValueTo(base.gameObject, iTween.Hash("from", 0, "to", 1, "time", 0.05f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); iTween.ScaleTo(base.gameObject, iTween.Hash("scale", 0.75f * Vector3.one, "islocal", true, "time", 0.4f, "easeType", iTween.EaseType.linear)); iTween.MoveTo(base.gameObject, iTween.Hash("position", 0.8f * target + 0.2f * origin, "islocal", true, "time", 1, "easeType", iTween.EaseType.linear)); iTween.ValueTo(base.gameObject, iTween.Hash("from", 1, "to", 0, "time", 0.05f, "delay", 0.95f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); SoundUtils.PlaySE(SEFIleInfos.BattleTorpedo); break; } default: { tex.mainTexture = (Resources.Load("Textures/TileAnimations/fire_5") as Texture); tex.MakePixelPerfect(); Vector3 vector = target - origin; base.transform.Rotate(Vector3.forward, 180f / (float)Math.PI * Mathf.Atan2(vector.y, vector.x)); iTween.ValueTo(base.gameObject, iTween.Hash("from", 0, "to", 1, "time", 0.05f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); iTween.MoveTo(base.gameObject, iTween.Hash("position", target, "islocal", true, "time", 0.25f, "easeType", iTween.EaseType.linear)); iTween.ValueTo(base.gameObject, iTween.Hash("from", 1, "to", 0, "time", 0.05f, "delay", 0.2f, "onupdate", "Alpha", "onupdatetarget", base.gameObject)); SoundUtils.PlaySE(SEFIleInfos.SE_901); break; } } }
private void DestroyThis() { KeyControlManager.Instance.KeyController = StrategyTopTaskManager.GetCommandMenu().keyController; UnityEngine.Object.Destroy(base.gameObject); }
protected override bool Init() { this.isAnimationStarted = false; this.mDisplaySwipeRegion.SetEventCatchCamera(this.mCamera); this.mDisplaySwipeRegion.SetOnSwipeActionJudgeCallBack(new UIDisplaySwipeEventRegion.SwipeJudgeDelegate(this.OnSwipeAction)); this.mStageSelectRoot.set_localPosition(new Vector3(this.mCamera.get_transform().get_localPosition().x, this.mCamera.get_transform().get_localPosition().y)); this.mAreaId = StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID; this.mStrategyTopTaskManager = StrategyTaskManager.GetStrategyTop(); this.mIsFinishedAnimation = false; this.mMapModels = StrategyTopTaskManager.GetLogicManager().SelectArea(this.mAreaId).Maps; this.mSortieManager = StrategyTopTaskManager.GetLogicManager().SelectArea(this.mAreaId); this.mKeyController = new KeyControl(0, 0, 0.4f, 0.1f); this.mKeyController.isLoopIndex = true; this.mKeyController.IsRun = false; TweenAlpha.Begin(GameObject.Find("Information Root"), 0.3f, 0f); TweenAlpha.Begin(GameObject.Find("Map_BG"), 0.3f, 0f); GameObject gameObject = StrategyTopTaskManager.Instance.TileManager.Tiles[this.mAreaId].getSprite().get_gameObject(); this.mTransform_AnimationTile = Util.Instantiate(gameObject, GameObject.Find("Map Root").get_gameObject(), true, false).get_transform(); this.mAnimation_MapObjects = this.mTransform_StageCovers.GetComponent <Animation>(); base.StartCoroutine(this.StartSeaAnimationCoroutine()); IEnumerator enumerator = this.StartSeaAnimationCoroutine(); base.StartCoroutine(enumerator); this.mTransform_StageCovers.SetActive(true); this.mTransform_StageCovers.Find("UIStageCovers").GetComponent <UIWidget>().alpha = 0.001f; this.SelectedHexAnimation(delegate { base.StartCoroutine(this.InititalizeStageCovers(delegate { this.mTransform_StageCovers.GetComponent <Animation>().Play("SortieAnimation"); this.ShowMaps(this.mMapModels); })); }); if (this.mAreaId == 2 || this.mAreaId == 4 || this.mAreaId == 5 || this.mAreaId == 6 || this.mAreaId == 7 || this.mAreaId == 10 || this.mAreaId == 14) { this.mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_sky") as Texture); this.mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.height = 91; this.mTexture_sallyBGcloudRefl.alpha = 0.25f; this.mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea2_Sunny_sea") as Texture); this.mTexture_snow.mainTexture = null; } else if (this.mAreaId == 3 || this.mAreaId == 13) { this.mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_sky") as Texture); this.mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.height = 90; this.mTexture_sallyBGcloudRefl.alpha = 0.75f; this.mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea3_Sunny_sea") as Texture); this.mTexture_snow.mainTexture = (Resources.Load("Textures/Strategy/sea3_snow") as Texture); } else if (this.mAreaId == 15 || this.mAreaId == 16 || this.mAreaId == 17) { this.mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_sky2") as Texture); this.mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.height = 120; this.mTexture_sallyBGcloudRefl.alpha = 0.25f; this.mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea4_Sunny_sea") as Texture); this.mTexture_snow.mainTexture = null; } else { this.mTexture_sallyBGsky.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_sky") as Texture); this.mTexture_sallyBGclouds.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_clouds") as Texture); this.mTexture_sallyBGcloudRefl.height = 140; this.mTexture_sallyBGcloudRefl.alpha = 0.25f; this.mTexture_bgSea.mainTexture = (Resources.Load("Textures/Strategy/sea1_Sunny_sea") as Texture); this.mTexture_snow.mainTexture = null; } return(true); }
private bool CheckActiveDeckExist() { return(Enumerable.Any <DeckModel>(StrategyTopTaskManager.GetLogicManager().UserInfo.GetDecks(), (DeckModel x) => !x.IsActionEnd())); }
private bool isDisableDeck(int deckNo) { return(StrategyTopTaskManager.GetLogicManager().UserInfo.GetDeck(deckNo).Count == 0); }