[Header("Mission")]
[SerializeField] private Dialog[] mission;
[SerializeField] private Dialog[] missionComplete;
[SerializeField] private Dialog[] missionGoal;
[SerializeField] TutorialManager TM;
[SerializeField] private string missionTxt;
[SerializeField] private string completeTxt;
[SerializeField] private string goalTxt;
private void UpdateMissionComplete()
{
missionComplete[0].dialog = gambleCount.ToString();
}
public void CreateMissionText()
{
missionTxt = "";
completeTxt = "";
goalTxt = "";
if (mission.Length == 1)
{
missionTxt = mission[0].dialog;
completeTxt = missionComplete[0].dialog;
goalTxt = missionGoal[0].dialog;
}
else
{
string tempText;
for (int i = 1; i < mission.Length; i++)
{
tempText = "\n" + mission[i].dialog;
missionTxt = missionTxt + tempText;
}
missionTxt = mission[0].dialog + missionTxt;
for (int i = 1; i < missionComplete.Length; i++)
{
tempText = "\n" + missionComplete[i].dialog;
completeTxt = completeTxt + tempText;
}
completeTxt = missionComplete[0].dialog + completeTxt;
for (int i = 1; i < missionGoal.Length; i++)
{
tempText = "\n" + missionGoal[i].dialog;
goalTxt = goalTxt + tempText;
}
goalTxt = missionGoal[0].dialog + goalTxt;
}
UpdateMissionText();
}
public void UpdateMissionText()
{
TM.MissionTxt.text = missionTxt;
TM.CompleteTxt.text = completeTxt;
TM.GoalTxt.text = goalTxt;
TM.MissionBox.SetActive(true);
}
public void DisableMissionBox()
{
TM.MissionBox.SetActive(false);
}