Ejemplo n.º 1
0
    void Awake()
    {
        currentScene = SceneManager.GetActiveScene();

        cam = Camera.main;
        ropeJoint.enabled     = false;
        playerPosition        = transform.position;
        ropeHingeAnchorRb     = ropeHingeAnchor.GetComponent <Rigidbody2D>();
        ropeHingeAnchorSprite = ropeHingeAnchor.GetComponent <SpriteRenderer>();

        if (currentScene.name == "Level Boss")
        {
            bossCutsceneObj    = GameObject.Find("CameraWaypoint");
            bossCutsceneScript = bossCutsceneObj.GetComponent <bossStartCutscene>();
        }
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    private void Awake()
    {
        canvas = GameObject.Find("Canvas");
        whipColliderAnimation = whipObject.GetComponent <Animation>();
        currentScene          = SceneManager.GetActiveScene();

        player       = this.GetComponent <Rigidbody2D>();
        healthScript = canvas.GetComponent <health>();
        if (currentScene.name == "Level Boss")
        {
            bossCutsceneObj    = GameObject.Find("CameraWaypoint");
            bossCutsceneScript = bossCutsceneObj.GetComponent <bossStartCutscene>();
        }

        bossScript = anubis.GetComponent <anubisScript>();


        //footsteps = GetComponent<AudioSource>();
    }