void Awake()
    {
        BScript = GetComponent <BunnyScript>();
        PScript = player.GetComponent <PlayerScript>();
        blackScreen.canvasRenderer.SetAlpha(1);
        fadingScreen = true;
        fadeInBlack  = false;

        bunny = BScript.startBunny;

        sceneNumber = 0;

        autoInteractObjectList = GameObject.FindGameObjectsWithTag("AutoInteract");

        DontDestroyOnLoad(this.gameObject);
        gameEnded = false;

        butterflyCount = 0;
    }
Beispiel #2
0
    void Awake()
    {
        playerMovementDisabled = false;
        rb             = GetComponent <Rigidbody>();
        playerCollider = GetComponent <CapsuleCollider>();
        playerRenderer = GetComponent <SpriteRenderer>();
        jumpCount      = 1;
        canStartText   = false;
        startAutoText  = false;
        crouched       = false;
        crouchAllowed  = true;
        currentSpeed   = playerSpeed;

        gameController = GameObject.Find("GameController");
        GCScript       = gameController.GetComponent <GameControllerScript>();
        DCScript       = gameController.GetComponent <DialogueControllerScript>();
        BScript        = gameController.GetComponent <BunnyScript>();

        playerDead = false;
    }