forked from cgvr/DeltaVR
new table model in archery range, disable buttons at first, play printing sound
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using FMOD.Studio;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class ArcheryRangeNPC : NPCController
|
||||
@@ -18,7 +17,6 @@ public class ArcheryRangeNPC : NPCController
|
||||
public Transform startTargetQuestMarkerPoint;
|
||||
|
||||
private Texture2D GeneratedTexture;
|
||||
private EventInstance printingSound;
|
||||
|
||||
// states:
|
||||
// 0 - idle
|
||||
@@ -39,9 +37,6 @@ public class ArcheryRangeNPC : NPCController
|
||||
microphoneStand.OnPlayerFinishedSpeaking += OnPlayerUsedMicrophone;
|
||||
imageGenerationButton.OnButtonPressed += OnImageGenerationButtonPressed;
|
||||
modelGenerationButton.OnButtonPressed += OnModelGenerationButtonPressed;
|
||||
|
||||
printingSound = AudioManager.Instance.CreateInstance(FMODEvents.Instance.Printing);
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
}
|
||||
|
||||
protected async override void OnPlayerApproach()
|
||||
@@ -64,7 +59,7 @@ public class ArcheryRangeNPC : NPCController
|
||||
|
||||
protected override void OnPlayerLeave()
|
||||
{
|
||||
Debug.Log("Alien NPC: player left");
|
||||
|
||||
}
|
||||
|
||||
private void OnPlayerUsedMicrophone()
|
||||
@@ -73,6 +68,7 @@ public class ArcheryRangeNPC : NPCController
|
||||
{
|
||||
SpeakVoiceLine(3);
|
||||
questMarker.MoveTo(imageGenerationButton.transform);
|
||||
imageGenerationButton.Deactivate();
|
||||
state = 2;
|
||||
}
|
||||
}
|
||||
@@ -106,9 +102,7 @@ public class ArcheryRangeNPC : NPCController
|
||||
state = 4;
|
||||
}
|
||||
|
||||
printingSound.start();
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 0);
|
||||
|
||||
modelDisplay.StartPrinting();
|
||||
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||
|
||||
@@ -122,7 +116,6 @@ public class ArcheryRangeNPC : NPCController
|
||||
state = 5;
|
||||
}
|
||||
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
modelGenerationButton.Deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user