private void Start() { character = FindObjectOfType <Character>(); cameraFade = FindObjectOfType <CameraFade>(); cameraShake = cameraFade.GetComponent <CameraShake>(); checkPoints = FindObjectsOfType <Checkpoint>(); Pause(false); stopWatch.gameObject.SetActive(true); }
void Start() { cameraFade = Transform.FindObjectOfType <CameraFade>(); cameraShake = cameraFade.GetComponent <CameraShake>(); //declaring the rigidbody rb = GetComponent <Rigidbody2D>(); lr = GetComponent <LineRenderer>(); spawnPos = transform.position; //audio sources jumpSource = gameObject.AddComponent <AudioSource>(); wooshSource = gameObject.AddComponent <AudioSource>(); woodHitSource = gameObject.AddComponent <AudioSource>(); landHitSource = gameObject.AddComponent <AudioSource>(); DisPatchHook(); }