forked from cgvr/DeltaVR
professor says good job after first config done
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -26,8 +25,9 @@ public class ShapeDetectionNPC : NPCController
|
||||
// 3 - player spoke into the radio
|
||||
// 4 - player pressed enter on keyboard
|
||||
// 5 - player inserted picture into printer
|
||||
// 6 - shape scanner completed
|
||||
// 7 - moving away
|
||||
// 6 - player completed first shape scanner config
|
||||
// 7 - shape scanner completed
|
||||
// 8 - moving away
|
||||
private int state;
|
||||
private float lastPlayerApproachTime;
|
||||
|
||||
@@ -43,7 +43,8 @@ public class ShapeDetectionNPC : NPCController
|
||||
radio.OnPlayerFinishedSpeaking += OnPlayerSpokeIntoRadio;
|
||||
printerInsertionHole.OnPlayerInsertedPrintable += OnPlayerInitiatedPrinting;
|
||||
computerPrinter.OnImagePrinted += OnPlayerPrintedImage;
|
||||
shapeScanner.OnShapeScannerCompleted += OnShapeScannerCompleted;
|
||||
shapeScanner.OnConfigCompleted += OnPlayerCompletedFirstConfiguration;
|
||||
shapeScanner.OnAllCompleted += OnShapeScannerCompleted;
|
||||
}
|
||||
|
||||
protected async override void OnPlayerApproach()
|
||||
@@ -132,10 +133,22 @@ public class ShapeDetectionNPC : NPCController
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPlayerCompletedFirstConfiguration()
|
||||
{
|
||||
if (state == 5)
|
||||
{
|
||||
SpeakVoiceLine(6, radio.gameObject, radioAmount);
|
||||
state = 6;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnShapeScannerCompleted()
|
||||
{
|
||||
state = 6;
|
||||
questMarker.MoveTo(questMarkerPoint);
|
||||
if (state == 6)
|
||||
{
|
||||
state = 7;
|
||||
questMarker.MoveTo(questMarkerPoint);
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveToNextPoint(int pointIndex)
|
||||
@@ -153,9 +166,9 @@ public class ShapeDetectionNPC : NPCController
|
||||
|
||||
public async void OnPlayerEnteredRoom()
|
||||
{
|
||||
if (state == 6)
|
||||
if (state == 7)
|
||||
{
|
||||
state = 7;
|
||||
state = 8;
|
||||
staticRadio.SetActive(false);
|
||||
questMarker.gameObject.SetActive(false);
|
||||
await Task.Delay(2500);
|
||||
|
||||
Reference in New Issue
Block a user