forked from cgvr/DeltaVR
Compare commits
2 Commits
75bd66fc36
...
24000ec80c
| Author | SHA1 | Date | |
|---|---|---|---|
| 24000ec80c | |||
| ec45c402af |
@@ -1,19 +1,22 @@
|
||||
### TODO
|
||||
* glTF loading: vahetada ära shader Universal render pipelin Lit, mitte panna buildi kaasa glTf oma
|
||||
* shape scanner initialisation correct number of confs
|
||||
* user flow: grab item? mida krabada
|
||||
* 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
|
||||
* shape scanner:
|
||||
* 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
|
||||
* peenikesemad kiired
|
||||
* 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
|
||||
* 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:
|
||||
* 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
|
||||
* quest marker järjest järgmise tegevuse kohal: mikrofon, siis nupud
|
||||
* character billboard:
|
||||
|
||||
@@ -30,7 +30,6 @@ public class ArcheryRange : NetworkBehaviour
|
||||
|
||||
public ArcheryRangeModelGenerationController modelGenerationController;
|
||||
public KeyboardManager keyboardManager;
|
||||
public NPCController npcController;
|
||||
|
||||
private List<ArcheryTarget> _targets;
|
||||
|
||||
@@ -59,11 +58,6 @@ public class ArcheryRange : NetworkBehaviour
|
||||
StartCoroutine(DelayedSetHighScoreText(10f)); // Cannot immediately assign these values because fishnet needs time.
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
npcController.StartTalking();
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator DelayedSetHighScoreText(float delaySeconds)
|
||||
{
|
||||
yield return new WaitForSeconds(delaySeconds);
|
||||
|
||||
Binary file not shown.
@@ -22,7 +22,9 @@ public class FMODEvents : MonoBehaviour
|
||||
[field: SerializeField] public EventReference BowGrab { get; private set; }
|
||||
[field: SerializeField] public EventReference Spray { get; private set; }
|
||||
[field: SerializeField] public EventReference Coughing { get; private set; }
|
||||
//[field: SerializeField] public EventReference MyNewSoundEffect { get; private set; }
|
||||
[field: SerializeField] public EventReference KitchenPlate { get; private set; }
|
||||
[field: SerializeField] public EventReference ShapeScannerSuccess { get; private set; }
|
||||
[field: SerializeField] public EventReference Printing { get; private set; }
|
||||
|
||||
[field: Header("CAR")]
|
||||
[field: SerializeField] public EventReference DoorOpen { get; private set; }
|
||||
@@ -35,6 +37,7 @@ public class FMODEvents : MonoBehaviour
|
||||
[field: SerializeField] public EventReference Hover { get; private set; }
|
||||
[field: SerializeField] public EventReference LetterEnter { get; private set; }
|
||||
[field: SerializeField] public EventReference LetterHover { get; private set; }
|
||||
[field: SerializeField] public EventReference RadioButton { get; private set; }
|
||||
|
||||
[field: Header("Initial events")]
|
||||
[field: SerializeField] public EventReference PortalSpacial { get; private set; }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using FMOD.Studio;
|
||||
|
||||
public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
{
|
||||
@@ -18,8 +19,10 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
public Material modelDisplayActiveMaterial;
|
||||
public Transform wire;
|
||||
public Material wireActiveMaterial;
|
||||
public NPCController npcController;
|
||||
|
||||
private bool modelGenerationInProgress;
|
||||
private EventInstance printingSound;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
@@ -27,6 +30,9 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
imageGenerationButton.OnButtonPressed += InvokeImageGeneration;
|
||||
modelGenerationButton.OnButtonPressed += InvokeModelGeneration;
|
||||
modelGenerationInProgress = false;
|
||||
|
||||
printingSound = AudioManager.Instance.CreateInstance(FMODEvents.Instance.Printing);
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -51,11 +57,17 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
{
|
||||
modelGenerationButton.Deactivate();
|
||||
}
|
||||
|
||||
npcController.SpeakVoiceLine(3);
|
||||
}
|
||||
|
||||
private async void InvokeModelGeneration()
|
||||
{
|
||||
modelGenerationInProgress = true;
|
||||
|
||||
printingSound.start();
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 0);
|
||||
|
||||
string encodedTexture = Convert.ToBase64String(GeneratedTexture.EncodeToJPG());
|
||||
byte[] encodedModel = await TrellisClient.Instance.GenerateModel(encodedTexture);
|
||||
|
||||
@@ -66,6 +78,9 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
spawnedObject.transform.position = modelDisplay.position;
|
||||
GeneratedModel = spawnedObject;
|
||||
|
||||
printingSound.setParameterByName("3DPrinterPrintingJob", 1);
|
||||
npcController.SpeakVoiceLine(4);
|
||||
|
||||
OnModelReady();
|
||||
modelGenerationButton.Deactivate();
|
||||
modelGenerationInProgress = false;
|
||||
@@ -79,5 +94,6 @@ public class ArcheryRangeModelGenerationController : MonoBehaviour
|
||||
}
|
||||
|
||||
modelDisplay.GetComponent<MeshRenderer>().material = modelDisplayActiveMaterial;
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ public class MicrophoneStand : MonoBehaviour
|
||||
public GameObject microphoneOffStatus;
|
||||
public GameObject microphoneOnStatus;
|
||||
|
||||
public NPCController npcController;
|
||||
public FMODWhisperBridge fmodWhisperBridge;
|
||||
|
||||
// Start is called before the first frame update
|
||||
@@ -34,6 +35,8 @@ public class MicrophoneStand : MonoBehaviour
|
||||
{
|
||||
microphoneOffStatus.SetActive(false);
|
||||
microphoneOnStatus.SetActive(true);
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
||||
npcController.SpeakVoiceLine(1);
|
||||
fmodWhisperBridge.ActivateRecording();
|
||||
}
|
||||
}
|
||||
@@ -45,6 +48,8 @@ public class MicrophoneStand : MonoBehaviour
|
||||
{
|
||||
microphoneOffStatus.SetActive(true);
|
||||
microphoneOnStatus.SetActive(false);
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.RadioButton, gameObject);
|
||||
npcController.SpeakVoiceLine(2);
|
||||
fmodWhisperBridge.DeactivateRecording();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public class PushableButton : MonoBehaviour
|
||||
{
|
||||
movableParts.DOLocalMoveY(downPositionY, moveDuration);
|
||||
isButtonDown = true;
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
|
||||
if (wire != null)
|
||||
{
|
||||
@@ -71,6 +72,7 @@ public class PushableButton : MonoBehaviour
|
||||
{
|
||||
movableParts.DOLocalMoveY(upPositionY, moveDuration);
|
||||
isButtonDown = false;
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
|
||||
if (wire != null)
|
||||
{
|
||||
|
||||
@@ -97,6 +97,8 @@ public class ShapeScanner : MonoBehaviour
|
||||
rayCount = configuration.rows.SelectMany(row => row.cells).Count();
|
||||
correctRayStates = configuration.rows.SelectMany(row => row.cells).Count(cell => !cell);
|
||||
UpdateDisplay(calculateCorrectPercentage());
|
||||
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.ShapeScannerSuccess, gameObject);
|
||||
}
|
||||
|
||||
private float calculateCorrectPercentage()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -13,6 +14,8 @@ public class NPCController : MonoBehaviour
|
||||
public float mouthScalingMultiplier = 2.5f;
|
||||
public float mouthMovementDuration = 0.25f;
|
||||
|
||||
public string[] voiceLineKeys;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
@@ -22,6 +25,11 @@ public class NPCController : MonoBehaviour
|
||||
isTalking = false;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
@@ -40,9 +48,11 @@ public class NPCController : MonoBehaviour
|
||||
if (controller != null)
|
||||
{
|
||||
playerTransform = controller.transform;
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||
} else if (playerOrigin != null)
|
||||
{
|
||||
playerTransform = playerOrigin.transform;
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[0], gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +70,11 @@ public class NPCController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SpeakVoiceLine(int voiceLineId)
|
||||
{
|
||||
AudioManager.Instance.PlayDialogue(voiceLineKeys[voiceLineId], gameObject);
|
||||
}
|
||||
|
||||
public void StartTalking()
|
||||
{
|
||||
isTalking = true;
|
||||
|
||||
Reference in New Issue
Block a user