Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        //This is handling the rotation stuff

        //If the right arrow is pressed, the function which handles right rotation is called
        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            cubeScript.RotateRight();
        }
        //As above, but with left
        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            cubeScript.RotateLeft();
        }

        //this ChangeSceneCheck function will be listening for the keys which
        //are being used to change scenes.  You can look at the actual function
        //in staticHolderScript.cs
        holderScript.ChangeSceneCheck();
    }