//---------------------------------------------------------------------------- /*! * @brief 主人公情報長押しタッチ処理: */ //---------------------------------------------------------------------------- public void OnHeroLongToutch() { // メニューオープンタイミングのチェック bool isOpen = InGameUtil.ChkInGameOpenWindowTiming(); if (isOpen == false) { return; } if (InGameMenuManagerQuest2.Instance != null) { if (InGameMenuManagerQuest2.Instance.isSkillMenuActive == true) { return; } } // チュートリアル中の禁止処理 if (BattleParam.IsTutorial()) { if (BattleSceneManager.Instance.isTutorialEnableUnitInfoWindow() == false) { return; } } SceneModeContinuousBattle.Instance.HeroWindowOpen(); }
/// <summary> /// 敵が不死になっているか(BattleLogicがこれを見てBattleLogicを制御する) /// </summary> /// <returns></returns> public bool isNoDeadEnemy() { bool ret_val = BattleParam.IsTutorial() && m_IsNoDeadEnemy; return(ret_val); }
//---------------------------------------------------------------------------- /*! * @brief 主人公スキル発動タッチ処理: */ //---------------------------------------------------------------------------- public void OnHeroToutch() { // メニューオープンタイミングのチェック bool isOpen = InGameUtil.ChkInGameOpenWindowTiming(); if (isOpen == false) { return; } // チュートリアル中の発動禁止処理. if (BattleParam.IsTutorial()) { if (BattleSceneManager.Instance.isTutorialForbidLimitBreak(GlobalDefine.PartyCharaIndex.HERO)) { return; } } LocalSaveOption cOption = LocalSaveManager.Instance.LoadFuncOption(); if (cOption.m_OptionConfirmAS == (int)LocalSaveDefine.OptionConfirmAS.ON) { // ヒーロースキル発動確認ウィンドウを開く if (InGameMenuManagerQuest2.Instance != null) { InGameMenuManagerQuest2.Instance.OpenSkillMenu(GlobalDefine.PartyCharaIndex.HERO, 0, m_HeroTotalSkillPrv); } } else { // ヒーロースキルを即時発動 BattleParam.RequestLBS(GlobalDefine.PartyCharaIndex.HERO); } }
/// <summary> /// チュートリアルのフェイズを設定(BattleLogic側から設定される) /// </summary> /// <param name="phase"></param> public void setTutorialPhase(TutorialBattlePhase phase) { m_TutorialBattlePhaseReq = phase; // チュートリアルをスキップされた場合は、初めての戦闘でチュートリアルダイアログを表示する. if (phase == TutorialBattlePhase.INPUT && BattleParam.IsTutorial() == false ) { m_IsShowingTutorialDialog = true; new SerialProcess().Add((System.Action nextProcess) => { showFirstTutorialDialog(TutorialDialog.FLAG_TYPE.BATTLE1, nextProcess); }) .Add((System.Action nextProcess) => { showFirstTutorialDialog(TutorialDialog.FLAG_TYPE.AUTO_PLAY, nextProcess); }) .Add((System.Action nextProcess) => { m_IsNextCommand = true; m_IsShowingTutorialDialog = false; }) .Flush(); } if (BattleParam.IsTutorial()) { m_IsForbidButton = true; } }
//---------------------------------------------------------------------------- /*! * @brief スキル発動NOボタンタッチ処理 */ //---------------------------------------------------------------------------- public void OnSkillNo() { if (BattleParam.IsTutorial()) { return; // チュートリアル中は押せなくする } if (InGameUtil.isQuest2() == true) { changePartyUnitParent(false); } if (m_CharaIdx == GlobalDefine.PartyCharaIndex.HERO) { m_newSkill.setupHeroSkill(0); } else { m_newSkill.setupLimitBreakSkill(0, 0); } m_InGameMenuQuest2.Skill_menu_active = false; m_InGameMenuQuest2.Menu_bg_active = false; m_SkillMenuActive = false; SoundUtil.PlaySE(SEID.SE_MENU_RET); m_MenuButton.color = Color.white; UnityUtil.SetObjectEnabled(m_MenuButtonMask, false); }
//------------------------------------------------------------------------ /*! * @brief 更新処理 */ //------------------------------------------------------------------------ void Update() { // メニューオープンタイミングのチェック bool isOpen = InGameUtil.ChkInGameOpenWindowTiming(); if (isOpen == false && m_CurrentMenu != InGameMenuID.GAMEMENU_NONE) { // メニューを閉じる CloseInGameMenu(); return; } // リタイアリクエストが来ていたら終了 if (InGameQuestData.Instance && InGameQuestData.Instance.m_InGameRetire) { m_CurrentMenu = InGameMenuID.GAMEMENU_NONE; return; } m_OpenFrame = false; if (BattleParam.IsTutorial()) { updateForTutorial(); } }
public TutorialOptionMenuPhase getTutorialOptionMenuPhase() { if (BattleParam.IsTutorial()) { return(m_TutorialOptionMenuPhase); } return(TutorialOptionMenuPhase.ALL_ON); }
public bool isEnableOptionButton() { if (BattleParam.IsTutorial()) { return(m_IsEnableOptionButton && (m_IsForbidButton == false)); } return(true); }
public bool isEnableUnitInfoWindow() { if (BattleParam.IsTutorial()) { return(m_IsEnableUnitInfoWindow && (m_IsForbidButton == false)); } return(true); }
/// <summary> /// ダイアログ表示中待ちか(BattleLogicがこれを見てBattleLogicを制御する) /// </summary> /// <returns></returns> public bool isWaitTutorial() { bool ret_val = BattleParam.IsTutorial() && (m_CurrentCommandText != null || (m_TutorialBattlePhaseCurrent != m_TutorialBattlePhaseReq) ); ret_val |= m_IsShowingTutorialDialog; return(ret_val); }
/// <summary> /// 敵の全滅要求(BattleLogicがこれを見てBattleLogicを制御する) /// </summary> /// <param name="is_reset_flag"></param> /// <returns></returns> public bool isAllDeadEnemy(bool is_reset_flag) { bool ret_val = BattleParam.IsTutorial() && m_IsAllDeadEnemy; if (is_reset_flag) { m_IsAllDeadEnemy = false; } return(ret_val); }
public void OnAutoPlayButton() { if (BattleParam.IsTutorial()) { return; // チュートリアル中は押せなくする } switch (BattleParam.getAutoPlayState()) { case BattleParam.AutoPlayState.OFF: SoundUtil.PlaySE(SEID.SE_MENU_OK); BattleParam.setAutoPlayState(BattleParam.AutoPlayState.ON); break; case BattleParam.AutoPlayState.ON: SoundUtil.PlaySE(SEID.SE_MENU_OK); BattleParam.setAutoPlayState(BattleParam.AutoPlayState.OFF); break; } }
public bool isForbidLimitBreak(GlobalDefine.PartyCharaIndex caster_index) { if (BattleParam.IsTutorial()) { if (m_IsForbidButton) { return(true); } if (caster_index >= GlobalDefine.PartyCharaIndex.LEADER && caster_index < GlobalDefine.PartyCharaIndex.MAX) { return(m_IsForbidLimitBreak[(int)caster_index]); } if (caster_index == GlobalDefine.PartyCharaIndex.HERO) { return(true); } } return(false); }
//---------------------------------------------------------------------------- /*! * @brief メニューボタンタッチ処理 */ //---------------------------------------------------------------------------- public void OnMenuButton() { if (BattleParam.IsTutorial() == true) { return; } if (IsOpenGameMenu()) { SoundUtil.PlaySE(SEID.SE_MENU_RET); CloseInGameMenu(); } else { if (InGameUtil.ChkInGameOpenWindowTiming()) { SoundUtil.PlaySE(SEID.SE_BATLE_UI_OPEN); } OpenInGameMenu(); } }
public void updateTutorial(float delta_time) { if (BattleParam.IsTutorial() == false) { return; } m_IsForbidButton = m_IsWaitSend; bool is_continue = true; while (is_continue) { is_continue = false; bool is_update_phase = false; if (m_TutorialBattlePhaseCurrent != m_TutorialBattlePhaseReq) { m_TutorialBattlePhaseCurrent = m_TutorialBattlePhaseReq; is_update_phase = true; initPhase(); } // 場面別のコマンドを設定 if (is_update_phase) { if (m_BattleRound >= 0 && m_BattleRound < m_TutorialCommands.GetLength(0)) { if (m_TutorialBattlePhaseCurrent == TutorialBattlePhase.INPUT && m_BattleTurn != 1) { m_CommandTexts = m_TutorialCommands[m_BattleRound, (int)TutorialBattlePhase.INPUT2]; } else { m_CommandTexts = m_TutorialCommands[m_BattleRound, (int)m_TutorialBattlePhaseCurrent]; } } } // コマンドに応じて処理(ダイアログの表示など)を実行 if (m_CurrentCommandText == null && m_CommandTexts != null ) { execCommand(m_CommandTexts[0]); // 実行した分のコマンドを削除 if (m_CommandTexts.Length >= 2) { string[] dialog_texts = new string[m_CommandTexts.Length - 1]; for (int idx = 0; idx < dialog_texts.Length; idx++) { dialog_texts[idx] = m_CommandTexts[idx + 1]; } m_CommandTexts = dialog_texts; } else { m_CommandTexts = null; } } DialogButtonEventType dialog_button_event_type = DialogButtonEventType.NONE; // ユーザー入力によりダイアログ閉じる if (m_CurrentCommandText != null) { if (m_Dialog != null) { dialog_button_event_type = m_Dialog.PushButton; switch (dialog_button_event_type) { case DialogButtonEventType.OK: case DialogButtonEventType.YES: m_Dialog.Hide(); m_Dialog = null; m_CurrentCommandText = null; if (m_CommandTexts != null) { is_continue = true; } break; case DialogButtonEventType.CANCEL: case DialogButtonEventType.NO: m_Dialog.Hide(); m_Dialog = null; m_CurrentCommandText = null; if (m_CommandTexts != null) { is_continue = true; } break; } } else if (m_IsNextCommand) { is_continue = true; // 連続しているコマンドを一気に実行 m_IsNextCommand = false; dialog_button_event_type = DialogButtonEventType.OK; m_CurrentCommandText = null; } } // その他の制御 if (m_CurrentCommandText == null && m_TutorialBattlePhaseCurrent == TutorialBattlePhase.INPUT ) { switch (m_BattleRound) { case 0: if (m_TeacherProgress < teacher_data.Length) { Vector2 hand_pos = Vector2.zero; bool is_touching = updateTeacherHandPosition(delta_time, ref hand_pos); BattleSceneManager.Instance.setOverrideTouchMode(hand_pos, is_touching); } // お手本をもう一度見ますか? if (dialog_button_event_type == DialogButtonEventType.YES) { // もう一度お手本 initTeacher(); } if (dialog_button_event_type == DialogButtonEventType.NO) { // 敵を殺して次の戦闘へ m_IsAllDeadEnemy = true; } break; case 1: break; case 2: break; } } } }
/// <summary> /// チュートリアル向けの特殊処理 /// </summary> private void updateForTutorial() { if (BattleParam.IsTutorial() && m_InGameMenuQuest2.Menu_active != false && m_InGameMenuQuest2.Option_active != false ) { BattleTutorialManager.TutorialOptionMenuPhase tutorial_option_menu_phase = BattleParam.getTutorialOptionMenuPhase(); switch (tutorial_option_menu_phase) { case BattleTutorialManager.TutorialOptionMenuPhase.INIT: { // チュートリアルで説明する項目を初期化 LocalSaveOption cOption = LocalSaveManager.Instance.LoadFuncOption(); if (cOption != null) { if (cOption.m_OptionBattleSkillTurn != (int)LocalSaveDefine.OptionBattleSkillTurn.OFF) { OnOption(6); } if (cOption.m_OptionBattleSkillCost != (int)LocalSaveDefine.OptionBattleSkillCost.OFF) { OnOption(8); } } } break; case BattleTutorialManager.TutorialOptionMenuPhase.SKILL_TURN: { m_InGameMenuQuest2.Bgm_switch_enable = false; m_InGameMenuQuest2.Se_switch_enable = false; m_InGameMenuQuest2.Guide_switch_enable = false; m_InGameMenuQuest2.Tips_switch_enable = false; m_InGameMenuQuest2.Voice_switch_enable = false; m_InGameMenuQuest2.Speed_switch_enable = false; m_InGameMenuQuest2.Skill_turn_switch_enable = true; m_InGameMenuQuest2.Confirm_as_switch_enable = false; m_InGameMenuQuest2.Skill_cost_switch_enable = false; m_InGameMenuQuest2.Battle_achieve_switch_enable = false; m_InGameMenuQuest2.Quest_end_tips_switch_enable = false; m_InGameMenuQuest2.Auto_play_stop_boss_switch_enable = false; m_InGameMenuQuest2.Auto_play_use_as_switch_enable = false; m_InGameMenuQuest2.Back_button_enable = false; m_InGameMenuQuest2.Back_text_color = new Color32(255, 255, 255, 128); m_InGameMenuQuest2.IsScreenBgTouch = false; } break; case BattleTutorialManager.TutorialOptionMenuPhase.SKILL_COST: { m_InGameMenuQuest2.Bgm_switch_enable = false; m_InGameMenuQuest2.Se_switch_enable = false; m_InGameMenuQuest2.Guide_switch_enable = false; m_InGameMenuQuest2.Tips_switch_enable = false; m_InGameMenuQuest2.Voice_switch_enable = false; m_InGameMenuQuest2.Speed_switch_enable = false; m_InGameMenuQuest2.Skill_turn_switch_enable = false; m_InGameMenuQuest2.Confirm_as_switch_enable = false; m_InGameMenuQuest2.Skill_cost_switch_enable = true; m_InGameMenuQuest2.Battle_achieve_switch_enable = false; m_InGameMenuQuest2.Quest_end_tips_switch_enable = false; m_InGameMenuQuest2.Auto_play_stop_boss_switch_enable = false; m_InGameMenuQuest2.Auto_play_use_as_switch_enable = false; m_InGameMenuQuest2.Back_button_enable = false; m_InGameMenuQuest2.Back_text_color = new Color32(255, 255, 255, 128); m_InGameMenuQuest2.IsScreenBgTouch = false; } break; case BattleTutorialManager.TutorialOptionMenuPhase.BACK_BUTTON: { m_InGameMenuQuest2.Bgm_switch_enable = false; m_InGameMenuQuest2.Se_switch_enable = false; m_InGameMenuQuest2.Guide_switch_enable = false; m_InGameMenuQuest2.Tips_switch_enable = false; m_InGameMenuQuest2.Voice_switch_enable = false; m_InGameMenuQuest2.Speed_switch_enable = false; m_InGameMenuQuest2.Skill_turn_switch_enable = false; m_InGameMenuQuest2.Confirm_as_switch_enable = false; m_InGameMenuQuest2.Skill_cost_switch_enable = false; m_InGameMenuQuest2.Battle_achieve_switch_enable = false; m_InGameMenuQuest2.Quest_end_tips_switch_enable = false; m_InGameMenuQuest2.Auto_play_stop_boss_switch_enable = false; m_InGameMenuQuest2.Auto_play_use_as_switch_enable = false; m_InGameMenuQuest2.Back_button_enable = true; m_InGameMenuQuest2.Back_text_color = Color.white; m_InGameMenuQuest2.IsScreenBgTouch = true; } break; case BattleTutorialManager.TutorialOptionMenuPhase.ALL_ON: default: { m_InGameMenuQuest2.Bgm_switch_enable = true; m_InGameMenuQuest2.Se_switch_enable = true; m_InGameMenuQuest2.Guide_switch_enable = true; m_InGameMenuQuest2.Tips_switch_enable = true; m_InGameMenuQuest2.Voice_switch_enable = true; m_InGameMenuQuest2.Speed_switch_enable = true; m_InGameMenuQuest2.Skill_turn_switch_enable = true; m_InGameMenuQuest2.Confirm_as_switch_enable = true; m_InGameMenuQuest2.Skill_cost_switch_enable = true; m_InGameMenuQuest2.Battle_achieve_switch_enable = true; m_InGameMenuQuest2.Quest_end_tips_switch_enable = true; m_InGameMenuQuest2.Auto_play_stop_boss_switch_enable = true; m_InGameMenuQuest2.Auto_play_use_as_switch_enable = true; m_InGameMenuQuest2.Back_button_enable = true; m_InGameMenuQuest2.Back_text_color = Color.white; m_InGameMenuQuest2.IsScreenBgTouch = true; } break; } } }