/// <summary>
 /// Checks the distance of the player to the destination
 /// Updates completion accordingly
 /// </summary>
 /// <param name="radius">The radius of the wheel</param>
 protected virtual void LocationObject(Vector3 playerPos)
 {
     distanceToTarget = Vector3.Distance(playerPos, GetObjectivePosition());
     if (CheckCompleted())
     {
         UpdateCompleted();
     }
     QuestEvents.ObjectiveAdvance();
 }
Beispiel #2
0
 private void Tick()
 {
     if (CheckCompleted())
     {
         UpdateCompleted();
     }
     //calls the event, this will make it so the visual UI degrees you are compared to the turtle will update
     QuestEvents.ObjectiveAdvance();
 }
Beispiel #3
0
 /// <summary>
 /// Clear quest data and advance to the next stage once the objective is complete.
 /// </summary>
 protected virtual void UpdateCompleted()
 {
     if (UpdatedCompletion)
     {
         return;
     }
     UpdatedCompletion = true;
     DisableQuestMarkers();
     QuestSystem.instance.UpdateQuests();
     AudioManager.instance.PlayObjectiveComplete();
     QuestEvents.ObjectiveAdvance();
 }
 /// <summary>
 /// Checks if the picked up item is the correct item.
 /// Plays audio and updates objective accordingly
 /// </summary>
 /// <param name="slug">The slug of the picked up object</param>
 private void ItemTaken(string slug)
 {
     for (int i = 0; i < collectionItems.Length; i++)
     {
         if (collectionItems[i].CollectItem(slug))
         {
             AudioManager.instance.PlayObjectiveComplete();
             break;
         }
     }
     if (CheckCompleted())
     {
         UpdateCompleted();
     }
     QuestEvents.ObjectiveAdvance();
 }