1
0
forked from cgvr/DeltaVR

NPCs move quest marker around to next objectives

This commit is contained in:
2026-02-12 15:54:01 +02:00
parent 3d804dfdaf
commit cf709f4dc9
5 changed files with 29 additions and 3 deletions

View File

@@ -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());