void Awake() { // mass in kg accelerationGravity = 9.81f; tracksMinHeight = 3.66f; eKinStart = massCart * 5; playerControllerGO = GameObject.FindWithTag("OVRPlayerController"); playerController = playerControllerGO.GetComponent <PlayerController>(); ovrCameraRig = playerControllerGO.transform.Find("OVRCameraRig").gameObject; audioSourceInstantiate = gameObject.AddComponent <AudioSource>(); audioSourceInstantiate.playOnAwake = false; audioSourceInstantiate.volume = 0.5f; audioSourceInstantiate.clip = audioClipInstantiate; audioSourceCountdown = gameObject.AddComponent <AudioSource>(); audioSourceCountdown.playOnAwake = false; audioSourceCountdown.volume = 0.5f; audioSourceCountdown.clip = audioClipCountDown; rb = GetComponent <Rigidbody>(); fallBoxCollider.enabled = false; rollerCoasterBuilderController = GameObject.Find("RollerCoasterBuilder").GetComponent <RollerCoasterBuilderController>(); isRunning = false; isMoving = false; }
void Start() { rollerCoasterBuilderController = GameObject.Find("RollerCoasterBuilder").GetComponent <RollerCoasterBuilderController>(); }