Skip to content

Commit 5c022e9

Browse files
committed
another bug fix
1 parent ba31575 commit 5c022e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Assets/_Scripts/QuestsAndInstructions/QuestManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ private void InitialiseNextQuest()
115115
case QuestType.PointToTarget:
116116
{
117117
SnipeTarget.Sniped += OnSniped;
118+
previousLandmark = currentQuest.landmark;
118119
currentQuest.landmark=currentQuest.GetNextLandmark(mainQuestLandmarkSequence);
119120
string col = ColorUtility.ToHtmlStringRGB(NodeManager.Instance.ReturnColor(currentQuest.landmark));
120121
mainNotification.UpdateText("Please point at the <b><color=#"+col+">" + currentQuest.landmark + "</color></b>", 2, 2);
@@ -181,10 +182,14 @@ private void EndScene(string questType)
181182

182183
private IEnumerator SwitchToNextPointTask()
183184
{
185+
timer.Pause();
184186
currentQuest.state = QuestState.Finished;
185187
SimpleCapsuleWithStickMovement.Instance.EnableLinearMovement = false;
186188
string col = ColorUtility.ToHtmlStringRGB(NodeManager.Instance.ReturnColor(currentQuest.landmark));
187189
mainNotification.UpdateText("Congratulations, you made it to the <color=#"+col+">"+ currentQuest.landmark+"</color>!", 1,2);
190+
string finalTime = $"{timer.GetRawElapsedTime():0.##}";
191+
string task = "from" + previousLandmark + "to" + currentQuest.landmark;
192+
DataLogger.Instance.LogActivityData(task, finalTime);
188193
yield return new WaitForSeconds(3f);
189194
currentQuest.type = QuestType.PointToTarget;
190195
InitialiseNextQuest();
@@ -193,6 +198,8 @@ private IEnumerator SwitchToNextPointTask()
193198
private IEnumerator SwitchToNavigation()
194199
{
195200
yield return new WaitForSeconds(3f);
201+
timer.Reset();
202+
timer.Begin();
196203
currentQuest.type = QuestType.NavigateToTarget;
197204
SimpleCapsuleWithStickMovement.Instance.EnableLinearMovement = true;
198205
string col = ColorUtility.ToHtmlStringRGB(NodeManager.Instance.ReturnColor(currentQuest.landmark));

0 commit comments

Comments
 (0)