Beispiel #1
0
    void FindComponents()
    {
        // Finds scripts.
        timeScaleControllerScript  = GameObject.FindGameObjectWithTag("TimeScaleController").GetComponent <TimescaleController> ();
        playerControllerScript     = GameObject.Find("Player").GetComponent <PlayerController> ();
        brickStackControllerScript = GameObject.FindGameObjectWithTag("BrickStackController").GetComponent <BrickStackController> ();
        MouseScript = GameObject.FindGameObjectWithTag("GlobalMouseController").GetComponent <GlobalMouseVisibility>();

        // Finds Player transform.
        Player = GameObject.FindGameObjectWithTag("Player").transform;
    }
    void FindComponents()
    {
        // Finds scripts.
        timeScaleControllerScript = GameObject.FindGameObjectWithTag ("TimeScaleController").GetComponent<TimescaleController> ();
        playerControllerScript = GameObject.Find ("Player").GetComponent<PlayerController> ();
        brickStackControllerScript = GameObject.FindGameObjectWithTag ("BrickStackController").GetComponent<BrickStackController> ();
        MouseScript = GameObject.FindGameObjectWithTag ("GlobalMouseController").GetComponent<GlobalMouseVisibility>();

        // Finds Player transform.
        Player = GameObject.FindGameObjectWithTag ("Player").transform;
    }