Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        //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();

        //This is handling the cube moving stuff

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