forked from cgvr/DeltaVR
add some voicelines to archery range minigame
This commit is contained in:
@@ -2,18 +2,21 @@
|
|||||||
* glTF loading: vahetada ära shader Universal render pipelin Lit, mitte panna buildi kaasa glTf oma
|
* glTF loading: vahetada ära shader Universal render pipelin Lit, mitte panna buildi kaasa glTf oma
|
||||||
* user flow: grab item? mida krabada
|
* user flow: grab item? mida krabada
|
||||||
* user prefs: settinguid meelde jätta
|
* user prefs: settinguid meelde jätta
|
||||||
* võtta spawnitud mudeli mõõtmed: mehscollideri max x, max y, etc? bounding box?
|
* võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box?
|
||||||
* mängija collide'ib spawnitud mudeliga - ei tohiks
|
* mängija collide'ib spawnitud mudeliga - ei tohiks
|
||||||
* shape scanner:
|
* shape scanner:
|
||||||
* initialisation correct number of confs
|
* initialisation correct number of confs
|
||||||
* mitte-liigutatavaks, aga samal ajal kõrgus dünaamiliselt õige. või lihtsalt piisavalt madalale asetada või väljaulatuv kang millest krabada
|
* mitte-liigutatavaks, aga samal ajal kõrgus dünaamiliselt õige. või lihtsalt piisavalt madalale asetada või väljaulatuv kang millest krabada
|
||||||
* peenikesemad kiired
|
* peenikesemad kiired
|
||||||
* mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse
|
* mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse
|
||||||
|
* kui mudel despawnib shape scanneri kiirte sees olles siis collision detection läheb katki
|
||||||
* mustad kiired on halvasti nähtavad pruuni materjali taustal
|
* mustad kiired on halvasti nähtavad pruuni materjali taustal
|
||||||
* kui üks config completed, siis mängijale aru saada: sound effect, "loading"
|
* kui üks config completed, siis mängijale aru saada: sound effect, "loading"
|
||||||
* mikri vana tekst ei kao ära
|
* speech-to-text:
|
||||||
|
* vana tekst ei kao ära
|
||||||
|
* kogu tekst muutub ootamatult "Silence"-iks
|
||||||
* archery range:
|
* archery range:
|
||||||
* kui midagi laeb (wire aktiivne), siis particle'id voolavad mööda toru
|
* kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru
|
||||||
* highscore json tühjaks
|
* highscore json tühjaks
|
||||||
* quest marker järjest järgmise tegevuse kohal: mikrofon, siis nupud
|
* quest marker järjest järgmise tegevuse kohal: mikrofon, siis nupud
|
||||||
* character billboard:
|
* character billboard:
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ public class ArcheryRange : NetworkBehaviour
|
|||||||
|
|
||||||
public ArcheryRangeModelGenerationController modelGenerationController;
|
public ArcheryRangeModelGenerationController modelGenerationController;
|
||||||
public KeyboardManager keyboardManager;
|
public KeyboardManager keyboardManager;
|
||||||
public NPCController npcController;
|
|
||||||
|
|
||||||
private List<ArcheryTarget> _targets;
|
private List<ArcheryTarget> _targets;
|
||||||
|
|
||||||
@@ -59,11 +58,6 @@ public class ArcheryRange : NetworkBehaviour
|
|||||||
StartCoroutine(DelayedSetHighScoreText(10f)); // Cannot immediately assign these values because fishnet needs time.
|
StartCoroutine(DelayedSetHighScoreText(10f)); // Cannot immediately assign these values because fishnet needs time.
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
npcController.StartTalking();
|
|
||||||
}
|
|
||||||
|
|
||||||
private System.Collections.IEnumerator DelayedSetHighScoreText(float delaySeconds)
|
private System.Collections.IEnumerator DelayedSetHighScoreText(float delaySeconds)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(delaySeconds);
|
yield return new WaitForSeconds(delaySeconds);
|
||||||
|
|||||||
Binary file not shown.
@@ -19,6 +19,7 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
public Material modelDisplayActiveMaterial;
|
public Material modelDisplayActiveMaterial;
|
||||||
public Transform wire;
|
public Transform wire;
|
||||||
public Material wireActiveMaterial;
|
public Material wireActiveMaterial;
|
||||||
|
public NPCController npcController;
|
||||||
|
|
||||||
private bool modelGenerationInProgress;
|
private bool modelGenerationInProgress;
|
||||||
private EventInstance printingSound;
|
private EventInstance printingSound;
|
||||||
@@ -56,6 +57,8 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
modelGenerationButton.Deactivate();
|
modelGenerationButton.Deactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
npcController.SpeakVoiceLine(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void InvokeModelGeneration()
|
private async void InvokeModelGeneration()
|
||||||
@@ -76,6 +79,7 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
|||||||
GeneratedModel = spawnedObject;
|
GeneratedModel = spawnedObject;
|
||||||
|
|
||||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||||
|
npcController.SpeakVoiceLine(4);
|
||||||
|
|
||||||
OnModelReady();
|
OnModelReady();
|
||||||
modelGenerationButton.Deactivate();
|
modelGenerationButton.Deactivate();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ public class MicrophoneStand : MonoBehaviour
|
|||||||
public GameObject microphoneOffStatus;
|
public GameObject microphoneOffStatus;
|
||||||
public GameObject microphoneOnStatus;
|
public GameObject microphoneOnStatus;
|
||||||
|
|
||||||
|
public NPCController npcController;
|
||||||
public FMODWhisperBridge fmodWhisperBridge;
|
public FMODWhisperBridge fmodWhisperBridge;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
@@ -35,6 +36,7 @@ public class MicrophoneStand : MonoBehaviour
|
|||||||
microphoneOffStatus.SetActive(false);
|
microphoneOffStatus.SetActive(false);
|
||||||
microphoneOnStatus.SetActive(true);
|
microphoneOnStatus.SetActive(true);
|
||||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
||||||
|
npcController.SpeakVoiceLine(1);
|
||||||
fmodWhisperBridge.ActivateRecording();
|
fmodWhisperBridge.ActivateRecording();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,6 +49,7 @@ public class MicrophoneStand : MonoBehaviour
|
|||||||
microphoneOffStatus.SetActive(true);
|
microphoneOffStatus.SetActive(true);
|
||||||
microphoneOnStatus.SetActive(false);
|
microphoneOnStatus.SetActive(false);
|
||||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
||||||
|
npcController.SpeakVoiceLine(2);
|
||||||
fmodWhisperBridge.DeactivateRecording();
|
fmodWhisperBridge.DeactivateRecording();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
|
using System.Collections;
|
||||||
using Unity.XR.CoreUtils;
|
using Unity.XR.CoreUtils;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ public class NPCController : MonoBehaviour
|
|||||||
public float mouthScalingMultiplier = 2.5f;
|
public float mouthScalingMultiplier = 2.5f;
|
||||||
public float mouthMovementDuration = 0.25f;
|
public float mouthMovementDuration = 0.25f;
|
||||||
|
|
||||||
public string voicelineKey;
|
public string[] voiceLineKeys;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Awake()
|
void Awake()
|
||||||
@@ -47,9 +48,11 @@ public class NPCController : MonoBehaviour
|
|||||||
if (controller != null)
|
if (controller != null)
|
||||||
{
|
{
|
||||||
playerTransform = controller.transform;
|
playerTransform = controller.transform;
|
||||||
|
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||||
} else if (playerOrigin != null)
|
} else if (playerOrigin != null)
|
||||||
{
|
{
|
||||||
playerTransform = playerOrigin.transform;
|
playerTransform = playerOrigin.transform;
|
||||||
|
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,6 +70,11 @@ public class NPCController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SpeakVoiceLine(int voiceLineId)
|
||||||
|
{
|
||||||
|
AudioManager.Instance.PlayDialogue(voiceLineKeys[voiceLineId], gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
public void StartTalking()
|
public void StartTalking()
|
||||||
{
|
{
|
||||||
isTalking = true;
|
isTalking = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user