forked from cgvr/DeltaVR
radio transmitter emits particles towards computer screen
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* klaas on näha temast eespool
|
||||
* voicelines: list listidest, mille hulgast saab valida
|
||||
* shape detection:
|
||||
* võiks olla näha visuaalselt, millal raadio transmittib
|
||||
* enter key võiks olla disabled, kuni raadiot on kasutatud
|
||||
* professor võiks öelda "good job, continue..." pärast esimest successi
|
||||
* kui kõik configurationid tehtud, siis professor ütleb "thank you"
|
||||
* peab mängijale kuidagi selgitama, kuidas scale'ida prinditud objekte
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -13,6 +13,7 @@ public class RadioTransmitter : XRGrabInteractable
|
||||
public FMODWhisperBridge fmodWhisperBridge;
|
||||
public ReleasableButton radioButton;
|
||||
public TextMeshProUGUI computerScreen;
|
||||
public ParticleSystem particles;
|
||||
|
||||
private bool isProcessing;
|
||||
|
||||
@@ -22,12 +23,15 @@ public class RadioTransmitter : XRGrabInteractable
|
||||
radioButton.OnButtonPressed += OnRadioButtonPressed;
|
||||
radioButton.OnButtonReleased += OnRadioButtonReleased;
|
||||
isProcessing = false;
|
||||
|
||||
var emission = particles.emission;
|
||||
emission.enabled = false;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
particles.transform.LookAt(computerScreen.transform.position);
|
||||
}
|
||||
|
||||
protected override void OnSelectEntered(SelectEnterEventArgs args)
|
||||
@@ -45,6 +49,9 @@ public class RadioTransmitter : XRGrabInteractable
|
||||
fmodWhisperBridge.OnWhisperSegmentUpdated += OnPlayerSpeechUpdated;
|
||||
fmodWhisperBridge.OnWhisperSegmentFinished += OnPlayerSpeechFinished;
|
||||
fmodWhisperBridge.ActivateRecording();
|
||||
|
||||
var emission = particles.emission;
|
||||
emission.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,5 +75,8 @@ public class RadioTransmitter : XRGrabInteractable
|
||||
fmodWhisperBridge.OnWhisperSegmentUpdated -= OnPlayerSpeechUpdated;
|
||||
fmodWhisperBridge.OnWhisperSegmentFinished -= OnPlayerSpeechFinished;
|
||||
fmodWhisperBridge.DeactivateRecording();
|
||||
|
||||
var emission = particles.emission;
|
||||
emission.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user