// Update is called once per frame
    void Update()
    {
        if ((Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.W)) && !inMenu && playerCanMove)
        {
            this.transform.position += new Vector3(0, move, 0);
            cam.transform.position  += new Vector3(0, move, 0);
            mask.transform.position += new Vector3(0, move, 0);
            world.spawnNewPlatform();
            anim.hop();
            playerCanMove = false;
            Invoke("letPlayerMove", 0.1f);
        }

        if ((Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.D)) && this.transform.position.x != 2.4f && !inMenu)
        {
            this.transform.position += new Vector3(side, 0, 0);
        }

        if ((Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.A)) && this.transform.position.x != -2.4f && !inMenu)
        {
            this.transform.position += new Vector3(-side, 0, 0);
        }

        if ((Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.R)) && screens.getInRetryScreen())
        {
            newGame();
        }
    }