void Awake() { hand_right = GameObject.Find("hand_right"); hand_left = GameObject.Find("hand_left"); oculusTouchInputter = GameObject.Find("OculusTouchInputter").GetComponent <OculusTouchInputter>(); rb = GetComponent <Rigidbody>(); IsAnimation = false; IsFlying = false; AnimationName = ""; flyingMaterial = Resources.Load("Materials/LyricsFlying") as Material; for (int i = 0; i < samples.Length; i++) { samples[i] = 250; } hapticsClip = new OVRHapticsClip(samples, samples.Length); hitEffectRoom = Resources.Load("Prefabs/HitEffect_B") as GameObject; hitEffectHand = Resources.Load("Prefabs/HitEffect_A") as GameObject; explosionEffect = Resources.Load("Prefabs/Explosion_A") as GameObject; isPunched = false; explosionTime = 0; lyricsManager = GameObject.Find("LyricsManager").GetComponent <LyricsManager>(); csv = GameObject.Find("CSVWriter").GetComponent <MyCSVWriter>(); audioSource = GameObject.Find("Audio").GetComponent <AudioSource>(); }
// Use this for initialization void Start() { floorRenderer = floor.GetComponent <Renderer>(); ceilingRenderer = ceiling.GetComponent <Renderer>(); wallFrontRenderer = wallFront.GetComponent <Renderer>(); wallBackRenderer = wallBack.GetComponent <Renderer>(); wallRightRenderer = wallRight.GetComponent <Renderer>(); wallLeftRenderer = wallLeft.GetComponent <Renderer>(); InitRoomMaterials(); lyricsManager = GameObject.Find("LyricsManager").GetComponent <LyricsManager>(); lyrics = lyricsManager.Lyrics; }