public DialogTipItem(int _stone_num, int _stone_price, string _event_msg, string _caption_msg, DialogButtonEventType _type) { InitParam(); Stone_num = string.Format(GameTextUtil.GetText("sh119q_content3"), _stone_num); Stone_price = string.Format(GameTextUtil.GetText("sh119q_content5"), _stone_price); Event_msg = _event_msg; if (_event_msg != "") { Event_active = true; } Caption_msg = _caption_msg; if (_caption_msg != "") { Caption_active = true; } buttonType = _type; }
public DialogTipItem(StoreProduct _product, DialogButtonEventType _type) { InitParam(); product = _product; Stone_num = string.Format(GameTextUtil.GetText("sh119q_content3"), _product.product_num); Stone_price = _product.product_price_format; Event_active = false; if (_product.event_text != null && _product.event_text != "") { // 作成したテキストを連結したものを表示する string eventText = string.Format(_product.event_text, GameTextUtil.GetRemainStr(_product.remaining_time, GameTextUtil.GetText("general_time_01")), string.Format("残り{0}回", _product.event_chip_count)); Event_msg = eventText; Event_active = true; } Caption_active = false; if (_product.event_caption != null && _product.event_caption != "") { Caption_msg = _product.event_caption; Caption_active = true; } buttonType = _type; }
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; } } } }
public DialogAgeItem(string label, string limit, DialogButtonEventType type) { Age_label = label; buttonType = type; }