BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / AudioManager / Scenes / Scripts / TestScript.cs

TestScript.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
TestScript.cs 717 B Download Raw
1using UnityEngine;
2using System.Collections;
3
4namespace OVR
5{
6
7public class TestScript : MonoBehaviour {
8
9 [InspectorNote( "Sound Setup", "Press '1' to play testSound1 and '2' to play testSound2")]
10
11 public SoundFXRef testSound1;
12 public SoundFXRef testSound2;
13
14 // Use this for initialization
15 void Start () {
16
17 }
18
19
20 // Update is called once per frame
21 void Update ()
22 {
23 // use attached game object location
24 if ( Input.GetKeyDown( KeyCode.Alpha1 ) )
25 {
26 testSound1.PlaySoundAt( transform.position );
27 }
28
29 // hard code information
30 if ( Input.GetKeyDown( KeyCode.Alpha2 ) ) {
31 testSound2.PlaySoundAt( new Vector3( 5.0f, 0.0f, 0.0f ) );
32 }
33 }
34}
35
36} // namespace OVR