Add dialog loading function to call and trigger Dialog game state. Add Artificer Introduction tutorial task.
This commit is contained in:
parent
fdc02351bb
commit
cf5c63847c
@ -1169,6 +1169,7 @@
|
|||||||
<Text Include="assets\config\shops\Chapter 5 Merchants.txt" />
|
<Text Include="assets\config\shops\Chapter 5 Merchants.txt" />
|
||||||
<Text Include="assets\config\shops\Chapter 6 Merchants.txt" />
|
<Text Include="assets\config\shops\Chapter 6 Merchants.txt" />
|
||||||
<Text Include="assets\config\story\Chapter 1.txt" />
|
<Text Include="assets\config\story\Chapter 1.txt" />
|
||||||
|
<Text Include="Chapter 2.txt" />
|
||||||
<Text Include="Chapter_1_2nd_Boss.txt" />
|
<Text Include="Chapter_1_2nd_Boss.txt" />
|
||||||
<Text Include="Chapter_1_Creatures_Part_2.txt" />
|
<Text Include="Chapter_1_Creatures_Part_2.txt" />
|
||||||
<Text Include="Chapter_2_Boss.txt" />
|
<Text Include="Chapter_2_Boss.txt" />
|
||||||
|
@ -1343,6 +1343,9 @@
|
|||||||
<Text Include="Crawler_Artificer.txt">
|
<Text Include="Crawler_Artificer.txt">
|
||||||
<Filter>Documentation\Mechanics</Filter>
|
<Filter>Documentation\Mechanics</Filter>
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text Include="Chapter 2.txt">
|
||||||
|
<Filter>Configurations\Story</Filter>
|
||||||
|
</Text>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="assets\heart.ico">
|
<Image Include="assets\heart.ico">
|
||||||
|
@ -45,6 +45,7 @@ All rights reserved.
|
|||||||
#include "RowInventoryScrollableWindowComponent.h"
|
#include "RowInventoryScrollableWindowComponent.h"
|
||||||
#include "InventoryCreator.h"
|
#include "InventoryCreator.h"
|
||||||
#include "Tutorial.h"
|
#include "Tutorial.h"
|
||||||
|
#include "VisualNovel.h"
|
||||||
|
|
||||||
using A=Attribute;
|
using A=Attribute;
|
||||||
|
|
||||||
@ -85,7 +86,10 @@ void Monster::STRATEGY::NPC(Monster&m,float fElapsedTime,std::string strategy){
|
|||||||
Menu::OpenMenu(MenuType::MERCHANT);
|
Menu::OpenMenu(MenuType::MERCHANT);
|
||||||
}else
|
}else
|
||||||
if(m.npcData.function=="Artificer"){
|
if(m.npcData.function=="Artificer"){
|
||||||
Menu::OpenMenu(MenuType::MERCHANT);
|
if(!Tutorial::TaskIsComplete(TutorialTaskName::ARTIFICER_INTRO)){
|
||||||
|
Tutorial::CompleteTask(TutorialTaskName::ARTIFICER_INTRO);
|
||||||
|
VisualNovel::LoadDialog("ARTIFICER_INTRO");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -51,6 +51,7 @@ void Tutorial::Initialize(){
|
|||||||
CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask);
|
CREATETASK(TutorialTaskName::USE_RECOVERY_ITEMS,UseRecoveryItemsTask);
|
||||||
CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask);
|
CREATETASK(TutorialTaskName::BLACKSMITH,BlacksmithTask);
|
||||||
CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask);
|
CREATETASK(TutorialTaskName::EQUIP_GEAR,EquipGearTask);
|
||||||
|
CREATETASK(TutorialTaskName::ARTIFICER_INTRO,ArtificerIntroductionTask);
|
||||||
currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM;
|
currentTaskState=TutorialTaskName::SET_LOADOUT_ITEM;
|
||||||
ResetTasks();
|
ResetTasks();
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ enum class TutorialTaskName{
|
|||||||
USE_RECOVERY_ITEMS,
|
USE_RECOVERY_ITEMS,
|
||||||
BLACKSMITH,
|
BLACKSMITH,
|
||||||
EQUIP_GEAR,
|
EQUIP_GEAR,
|
||||||
|
ARTIFICER_INTRO,
|
||||||
NONE,
|
NONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -356,3 +357,13 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ArtificerIntroductionTask:public TutorialTask{
|
||||||
|
public:
|
||||||
|
inline ArtificerIntroductionTask():TutorialTask(){};
|
||||||
|
private:
|
||||||
|
virtual inline bool CompleteCondition()override final{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
virtual inline void OnComplete()override final{}
|
||||||
|
};
|
@ -192,6 +192,17 @@ void VisualNovel::Reset(){
|
|||||||
commands.clear();
|
commands.clear();
|
||||||
commandIndex=0;
|
commandIndex=0;
|
||||||
}
|
}
|
||||||
|
void VisualNovel::LoadDialog(std::string dialogName){
|
||||||
|
novel.storyLevel=dialogName;
|
||||||
|
novel.Reset();
|
||||||
|
for(std::unique_ptr<Command>&command:storyLevelData.at(dialogName)){
|
||||||
|
novel.commands.push_back(command.get());
|
||||||
|
}
|
||||||
|
GameState::ChangeState(States::DIALOG);
|
||||||
|
novel.ExecuteNextCommand();
|
||||||
|
novel.prevTheme=Menu::GetCurrentTheme().GetThemeName();
|
||||||
|
Menu::themeSelection="Purple";
|
||||||
|
}
|
||||||
void VisualNovel::LoadVisualNovel(std::string storyLevelName){
|
void VisualNovel::LoadVisualNovel(std::string storyLevelName){
|
||||||
novel.storyLevel=storyLevelName;
|
novel.storyLevel=storyLevelName;
|
||||||
novel.Reset();
|
novel.Reset();
|
||||||
|
@ -187,6 +187,7 @@ public:
|
|||||||
VisualNovel(VisualNovel&)=delete;
|
VisualNovel(VisualNovel&)=delete;
|
||||||
VisualNovel(VisualNovel&&)=delete;
|
VisualNovel(VisualNovel&&)=delete;
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
|
static void LoadDialog(std::string dialogName);
|
||||||
static void LoadVisualNovel(std::string storyLevelName);
|
static void LoadVisualNovel(std::string storyLevelName);
|
||||||
void ExecuteNextCommand();
|
void ExecuteNextCommand();
|
||||||
void Update();
|
void Update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user