public void GameStateMachine()
    {
        switch (currentGameStatus)
        {
        case (GameStatus.preLevel):

            // el jugador no podra moverse
            player.EnableOrDisableMovement(false);
            // los fantasmas no podran moverse
            for (int i = 0; i < ghController.Length; i++)
            {
                ghController[i].EnableOrDisableMovement(false);
            }

            // si no hay sonido sonando inicialmente lo ejecutamos
            if (soundManager.LaunchInitialGameSound() == false)
            {
                // si el sonido inicial ya ha acabado
                currentGameStatus = GameStatus.onLevel;
            }

            break;

        case (GameStatus.onLevel):

            // activamos el movimiento del personaje
            player.EnableOrDisableMovement(true);

            // activamos el movimiento de los fantasmas
            for (int i = 0; i < ghController.Length; i++)
            {
                ghController[i].EnableOrDisableMovement(true);
            }

            // comprobamos si quedan bolas por comer, si no quedan, pasamos al siguiente estado
            // CheckEndLevel();
            // ESTO LO HACEMOS CADA VEZ QUE COGEMOS UNA BOLA

            break;

        case (GameStatus.endLevel):


            // dependera de si hemos ganado o no lo que succedera


            if (victorious == true)
            {
                Debug.LogError("Has vencido, cargando siguiente nivel");

                remainingTimeForSceneChange += Time.deltaTime;
                if (remainingTimeForSceneChange >= endGame_VictoryTime)
                {
                    // cargamos el siguiente nivel
                    scnManager.LoadNextLevel();
                }
            }
            else
            {
                Debug.LogError("Has perdido, reiniciando nivel");
                remainingTimeForSceneChange += Time.deltaTime;
                if (remainingTimeForSceneChange >= endGame_DefeatTimee)
                {
                    // volvemos a cargar este nivel
                    // NO
                    //scnManager.ReloadCurrentLevel();
                    Debug.LogWarning("Saliendo del juego");
                    Debug.Break();
                }
            }


            break;
        }
    }