private void Start()
    {
        character   = FindObjectOfType <Character>();
        cameraFade  = FindObjectOfType <CameraFade>();
        cameraShake = cameraFade.GetComponent <CameraShake>();
        checkPoints = FindObjectsOfType <Checkpoint>();

        Pause(false);

        stopWatch.gameObject.SetActive(true);
    }
예제 #2
0
    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();
    }