diff --git a/resources/dialogue/sample_dialogues.json b/resources/dialogue/sample_dialogues.json index 58886c1..a08bdf1 100644 --- a/resources/dialogue/sample_dialogues.json +++ b/resources/dialogue/sample_dialogues.json @@ -7,9 +7,75 @@ { "id": "line_1", "type": "Line", - "speaker": "Ghost", + "speaker": "Милиция", "portrait": "resources/ghost_avatar.png", - "text": "Автомобиль 877 остановитесь немедленно!", + "text": "Автомобиль 256 остановитесь немедленно!", + "next": "end_1" + }, + { + "id": "end_1", + "type": "End" + } + ] + }, + { + "id": "dialogue_gas1", + "start": "line_1", + "nodes": [ + { + "id": "line_1", + "type": "Line", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", + "text": "Первая колонка, полный бак пожалуйста.", + "next": "line_2" + }, + { + "id": "line_2", + "type": "Line", + "speaker": "Кассир", + "portrait": "resources/ghost_avatar.png", + "text": "[Смотрит подозрительно]", + "next": "line_3" + }, + { + "id": "line_3", + "type": "Line", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", + "text": "Что вы на меня так смотрите, со мной что-то не так?", + "next": "line_4" + }, + { + "id": "line_4", + "type": "Line", + "speaker": "Кассир", + "portrait": "resources/ghost_avatar.png", + "text": "Нет-нет, все хорошо.", + "next": "line_5" + }, + { + "id": "line_5", + "type": "Line", + "speaker": "Кассир", + "portrait": "resources/ghost_avatar.png", + "text": "Говорите, первая колонка, да?", + "next": "line_6" + }, + { + "id": "line_6", + "type": "Line", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", + "text": "Да.", + "next": "line_7" + }, + { + "id": "line_7", + "type": "Line", + "speaker": "Кассир", + "portrait": "resources/ghost_avatar.png", + "text": "Вот, пожалуйста. Приходите к нам еще!", "next": "end_1" }, { @@ -25,16 +91,16 @@ { "id": "line_1", "type": "Line", - "speaker": "Ghost", - "portrait": "resources/ghost_avatar.png", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", "text": "Ну капец, мы застряли!", "next": "line_2" }, { "id": "line_2", "type": "Line", - "speaker": "Ghost", - "portrait": "resources/ghost_avatar.png", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", "text": "Теперь только пешком.", "next": "end_1" }, @@ -51,8 +117,8 @@ { "id": "line_1", "type": "Line", - "speaker": "Ghost", - "portrait": "resources/ghost_avatar.png", + "speaker": "Игрок", + "portrait": "resources/w/gg/gg2_s_podsvetkoy5.png", "text": "Все, приехали! Машина в хлам!", "next": "end_1" }, diff --git a/src/Game.cpp b/src/Game.cpp index dc0394d..67b6554 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -144,7 +144,8 @@ namespace ZL std::cout << "Load resurces step 4" << std::endl; - currentLocation = std::make_unique(renderer, inventory, "default"); + //currentLocation = std::make_unique(renderer, inventory, "default"); + currentLocation = std::make_unique(renderer, inventory, "forest"); currentLocation->setup(); @@ -513,7 +514,7 @@ namespace ZL break; } case SDLK_f: - currentLocation->dialogueSystem.startDialogue("driving_dialogue1"); + currentLocation->dialogueSystem.startDialogue("dialogue_gas1"); break; case SDLK_e: diff --git a/src/Location.cpp b/src/Location.cpp index 21d9cda..d549219 100644 --- a/src/Location.cpp +++ b/src/Location.cpp @@ -1209,7 +1209,7 @@ void Location::setup() } else { - if (x > 0.5) + //if (x > 0.5) { target = carPosition; Eigen::Vector3f toTarget = target - npcCar.position; @@ -1235,10 +1235,10 @@ void Location::setup() } hasTarget = dist > 0.5f; } - else + /*else { throttle = 0.f; - } + }*/ } float targetHeading = npcCar.rotation;