diff --git a/Assets/_PROJECT/Components/Bow/Scripts/ArcheryRange.cs b/Assets/_PROJECT/Components/Bow/Scripts/ArcheryRange.cs index fb0c6285..89f99ac8 100644 --- a/Assets/_PROJECT/Components/Bow/Scripts/ArcheryRange.cs +++ b/Assets/_PROJECT/Components/Bow/Scripts/ArcheryRange.cs @@ -20,6 +20,7 @@ public class ArcheryRange : NetworkBehaviour public Transform targetEndPosition; public GameObject targetPrefab; public StartTarget startTarget; + public QuestMarker questMarker; public GameObject archeryTargetPointsText; @@ -210,6 +211,8 @@ public class ArcheryRange : NetworkBehaviour _roundEndTime = Time.time + roundLength; _nextTargetTime = Time.time; _roundActive = true; + + questMarker.gameObject.SetActive(false); } public void AddScore(float distance) diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index 8a9e73de..ef7f94e3 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:768e594c061f3a35ff314ed4bed437f582fb83c107164d2d9e499506fc1f4b79 -size 68520603 +oid sha256:43ceb645e43003c3e4d0b51b4772bd99911a40fd534589eef030a85996bdcfef +size 68527037 diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ArcheryRangeNPC.cs b/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ArcheryRangeNPC.cs index b6c80b4a..ea8c4b24 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ArcheryRangeNPC.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ArcheryRangeNPC.cs @@ -7,11 +7,13 @@ using System.Threading.Tasks; public class ArcheryRangeNPC : NPCController { [Header("Archery Range Config")] + public QuestMarker questMarker; public MicrophoneStand microphoneStand; public PushableButton imageGenerationButton; public PushableButton modelGenerationButton; public Image imageDisplay; public ModelDisplay modelDisplay; + public Transform startTarget; private Texture2D GeneratedTexture; private EventInstance printingSound; @@ -44,11 +46,14 @@ public class ArcheryRangeNPC : NPCController { if (state == 0) { + questMarker.gameObject.SetActive(false); SpeakVoiceLine(0); await Task.Delay(2000); SpeakVoiceLine(1); await Task.Delay(6500); SpeakVoiceLine(2); + questMarker.gameObject.SetActive(true); + questMarker.MoveTo(microphoneStand.transform); await Task.Delay(3000); state = 1; @@ -65,6 +70,7 @@ public class ArcheryRangeNPC : NPCController if (state == 1) { SpeakVoiceLine(3); + questMarker.MoveTo(imageGenerationButton.transform); state = 2; } } @@ -87,6 +93,7 @@ public class ArcheryRangeNPC : NPCController { modelGenerationButton.Deactivate(); SpeakVoiceLine(4); + questMarker.MoveTo(modelGenerationButton.transform); } } @@ -109,6 +116,7 @@ public class ArcheryRangeNPC : NPCController if (state == 4) { SpeakVoiceLine(5); + questMarker.MoveTo(startTarget); state = 5; } diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ShapeDetectionNPC.cs b/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ShapeDetectionNPC.cs index 690e60cf..4af40f81 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ShapeDetectionNPC.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/NPCs/ShapeDetectionNPC.cs @@ -6,12 +6,14 @@ using UnityEngine.UI; public class ShapeDetectionNPC : NPCController { [Header("Shape Detection Minigame Config")] + public QuestMarker questMarker; public MicrophoneStand microphoneStand; public RadioTransmitter radio; public PushableButton imageGenerationButton; public PushableButton modelGenerationButton; public Texture2D GeneratedTexture { get; private set; } public Image imageDisplay; + public ShapeScanner shapeScanner; public GameObject GeneratedModel { get; private set; } public Transform modelSpawnPoint; @@ -55,6 +57,8 @@ public class ShapeDetectionNPC : NPCController { state = 1; await CallPlayer(); + await Task.Delay(2500); + questMarker.MoveTo(radio.transform); } } @@ -82,12 +86,14 @@ public class ShapeDetectionNPC : NPCController } } - private void OnPlayerPickedUpRadio() + private async void OnPlayerPickedUpRadio() { if (state == 1) { SpeakVoiceLine(2); state = 2; + await Task.Delay(5000); + questMarker.MoveTo(microphoneStand.transform); } } @@ -98,6 +104,7 @@ public class ShapeDetectionNPC : NPCController { SpeakVoiceLine(3); state = 3; + questMarker.MoveTo(imageGenerationButton.transform); } } @@ -114,6 +121,7 @@ public class ShapeDetectionNPC : NPCController { SpeakVoiceLine(4); state = 4; + questMarker.MoveTo(modelGenerationButton.transform); modelGenerationButton.Deactivate(); } } @@ -124,6 +132,7 @@ public class ShapeDetectionNPC : NPCController { SpeakVoiceLine(5); state = 5; + questMarker.MoveTo(shapeScanner.transform); } string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG()); diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs b/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs index 52a50395..33af8c78 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/QuestMarker.cs @@ -7,6 +7,7 @@ public class QuestMarker : MonoBehaviour public Transform movingPart; public float amplitude = 0.1f; // How far up/down it moves public float frequency = 1.5f; // Speed of oscillation + public float heightAboveTarget = 1f; private Vector3 startPos; private Transform playerTransform; @@ -47,4 +48,9 @@ public class QuestMarker : MonoBehaviour playerTransform = null; } } + + public void MoveTo(Transform target) + { + transform.position = target.position + new Vector3(0, heightAboveTarget, 0); + } }