public void loadLevel() {
        //System.out.println(levelNum);
        switch (levelNum) {
            case 1:
                //Level 1
                model = game.getMain().getAssetManager().loadModel("Scenes/LevelOne.j3o");
                playerStartPos = new Vector3f(20, 3, -35);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(50.0f, 13.0f, -15.0f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(89.0f, 13.0f, -65.0f, 0.0f);
                createDownBlock(15.0f, 16.0f, 15.0f, 17.0f, -5.0f, -10.0f);
                break;
            case 2:
                //Level 2
                model = game.getMain().getAssetManager().loadModel("Scenes/Level2.mesh.xml");
                playerStartPos = new Vector3f(0.0f, 10.0f, 40.0f);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(0.0f, 5.0f, 30.0f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(0.0f, 2.0f, -50.0f, 0.0f);
                createGlassBlock(1.0f, 0.2f, 16.2f, 0.0f, 0.5f, 0.0f);
                createLavaBlock(7.5f, 1.0f, 16.2f, 0.0f, -1.0f, 0.0f);
                break;
            case 3:
                //Level 3
                model = game.getMain().getAssetManager().loadModel("Scenes/Level3.mesh.xml");
                playerStartPos = new Vector3f(0, 0, 0);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(0f, 10f, -115f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createRevGravSwitch(0f, 5f, -126f, 0f);
                createNormGravSwitch(0f, 110f, -238f, 0f);
                createHoop(0f, -4f, -248f, 0f);
                break;
            case 4:
                //Level 4
                model = game.getMain().getAssetManager().loadModel("Scenes/Level4.mesh.xml");
                playerStartPos = new Vector3f(0, 0, 0);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(-33.6f, -3f, -130.0f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(-33.6f, -4f, -170.0f, 0.0f);
                createLavaBlock(200f, 1.0f, 200f, 0.0f, -10.0f, 0.0f);
                break;
            case 5:
                //Level 5
                model = game.getMain().getAssetManager().loadModel("Scenes/Level5.j3o");
                playerStartPos = new Vector3f(30, 15, -20);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(30.0f, 15.0f, -25.0f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(35f, 15f, 18f, 90f);
                createUpBlock(5f, .1f, 15f, -70f, 8.4f, -50f);  
                createDownBlock(3f, .1f, 25f, 25f, 17f, 24.5f);  
                createUpDownBlock(5f, .1f, 20f, -69f, 2f, 23f);  
                createUpBlock(5f, .1f, 12f, -40f, -5f, 37f);      
                createUpDownBlock(5f, .1f, 12f, -22f, 9f, 37f);  
                createNormGravSwitch(15f, 33f, 18f, 90f);
                createRevGravSwitch(0f, 13f, 18f, 90f);
                createLavaBlock(12f, .2f, 12f, -50f, 4f, 12f);
                createLavaBlock(17f, .2f, 25f, 20f, 0f, 24.5f);
                break;
            case 6:
                //Level 6
                model = game.getMain().getAssetManager().loadModel("Scenes/Level7.mesh.xml");
                playerStartPos = new Vector3f(10, 2, -10);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(10f, 2f, -20f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createLavaBlock(300.0f, 1.0f, 300.0f, 50.0f, 31.0f, 50.0f);
                createGlassBlock(0.2f, 15.0f, 25.0f, 86.7f, 25.0f, -19.0f);
                createGlassBlock(0.2f, 30.0f, 21.8f, 86.7f, 5.0f, -65.6f);
                createGlassBlock(0.2f, 15.0f, 25.0f, 86.7f, 5.0f, -112.5f);
                createGlassBlock(0.2f, 15.0f, 25.0f, 43.4f, 5.0f, -19.0f);
                createGlassBlock(0.2f, 30.0f, 21.8f, 43.4f, 5.0f, -65.6f);
                createGlassBlock(0.2f, 15.0f, 25.0f, 43.4f, 5.0f, -112.5f);
                createGlassBlock(25.0f, 15.0f, 0.2f, 18.5f, 5.0f, -87.3f);
                createGlassBlock(21.5f, 15.0f, 0.2f, 65.0f, 5.0f, -87.3f);
                createGlassBlock(25.0f, 15.0f, 0.2f, 112.0f, 25.0f, -87.3f);
                createGlassBlock(25.0f, 15.0f, 0.2f, 18.5f, 25.0f, -43.5f);
                createGlassBlock(21.5f, 30.0f, 0.2f, 65.0f, 5.0f, -43.5f);
                createGlassBlock(25.0f, 15.0f, 0.2f, 112.0f, 5.0f, -43.5f);
                createRevGravSwitch(20.0f, 1.5f, -85.0f, 0.0f);
                createRevGravSwitch(20.0f, 1.5f, -90.0f, 0.0f);
                createNormGravSwitch(40.0f, 27.5f, -100.0f, 90.0f);
                createRevGravSwitch(40.0f, 1.5f, -20.0f, 90.0f);
                createNormGravSwitch(65.0f, 27.5f, -20.0f, 90.0f);
                createRevGravSwitch(127.0f, 1.5f, -35.0f, 90.0f);
                createNormGravSwitch(100.0f, 27.5f, -60.0f, 90.0f);
                createRevGravSwitch(110.0f, 1.5f, -126.0f, 0.0f);
                createNormGravSwitch(65.0f, 27.5f, -67.0f, 0.0f);
                createHoop(70.0f, 1.5f, -50.0f, 180.0f);
                createRevGravSwitch(72.0f, 1.5f, -51.0f, 30.0f);
                createRevGravSwitch(68.0f, 1.5f, -51.0f, 150.0f);
                createRevGravSwitch(72.0f, 1.5f, -49.5f, 90.0f);
                createRevGravSwitch(68.0f, 1.5f, -49.5f, 90.0f);
                createRevGravSwitch(70.0f, 1.5f, -49.5f, 0.0f);
                createLavaBlock(21.5f, 10.0f, 32.6f, 65.0f, -9.0f, -120.0f);
                createNormGravSwitch(61.0f, 27.5f, -125.5f, 90.0f);
                createNormGravSwitch(61.0f, 27.5f, -121.5f, 90.0f);
                break;
            case 7:
                //Level 7
                model = game.getMain().getAssetManager().loadModel("Scenes/Level6.mesh.xml");
                playerStartPos = new Vector3f(3.5f, 55f, -3.5f);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(22f, 55f, -5f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createLavaBlock(300.0f, 1.0f, 300.0f, 50.0f, -5.0f, 50.0f);
                createDownBlock(10.0f, 4.0f, 7.0f, 28.0f, 48.0f, -77.5f);
                createUpBlock(10.0f, 4.0f, 8.0f, 28.0f, 25.4f, -46.5f);
                createHoop(22.0f, 8.0f, -115.0f, 0.0f);
                createGlassBlock(0.3f, 62.0f, 59.0f, 18.0f, 0.0f, -60.0f);
                createLavaBlock(10.0f, 0.4f, 6.5f, 28.01f, 29.3f, -77.0f);
                createLavaBlock(10.0f, 0.4f, 8.0f, 28.01f, 28.3f, -46.5f);
                break;
             case 8:
                 //Level 8
                model=game.getMain().getAssetManager().loadModel("Scenes/level8.j3o");
                playerStartPos = new Vector3f(-60f,5f,-10f);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(-60.0f, 1.0f, -8.0f);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(-20.0f, 2.0f, 15f,90f);
                createGlassBlock(.2f,10f,10f,-42f,5f,21f);
                createDownBlock(4.5f, .1f, 10f,-28f,15f,-15f);
                createLavaBlock(4.7f, .1f, 32.5f,-28f,-3f,-2f);
                break;    
            default:
                //test level
                model = game.getMain().getAssetManager().loadModel("Scenes/TestScene.j3o");
                playerStartPos = new Vector3f(0, 5, 20);
                game.getPlayer().setStart(playerStartPos);
                ballStartPos = new Vector3f(0, 5, 10);
                game.getBall().setPhysicsLocation(ballStartPos);
                createHoop(0.0f, 5.0f, 0.0f, 0.0f);
                createNormGravSwitch(15.0f, 5.0f, 0.0f, 0.0f);
                createNormGravSwitch(15.0f, 60.0f, 0.0f, 0.0f);
                createHighGravSwitch(5.0f, 5.0f, 0.0f, 0.0f);
                createLowGravSwitch(10.0f, 5.0f, 0.0f, 0.0f);
                createRevGravSwitch(20.0f, 5.0f, 0.0f, 0.0f);
                createGlassBlock(100.0f, 0.3f, 100.0f, 0.0f, 65.0f, 0.0f);
                createLavaBlock(25.0f, 10.0f, 25.0f, -80.0f, -7.0f, 75.0f);
                createDownBlock(5f, .5f, 10f, -20.0f, 20.0f, -20.0f);
                createDownBlock(5f, .5f, 10f, -5.0f, 20.0f, -20.0f);
                createUpDownBlock(5f, .5f, 10f, 10.0f, 5.0f, -20.0f);
                createUpDownBlock(5f, .5f, 10f, 25.0f, 5.0f, -20.0f);
                createUpBlock(5f, .5f, 10f, 40.0f, 5.0f, -20.0f);
                createUpBlock(5f, .5f, 10f, 55.0f, 5.0f, -20.0f);
                break;
        }
        model.setName("Level");
        model.setLocalScale(5f);
        CollisionShape sceneShape = CollisionShapeFactory.createMeshShape((Node) model);
        game.getMain().getRootNode().attachChild(model);
        landscape = new RigidBodyControl(sceneShape, 0);
        model.addControl(landscape);
        game.getBulletAppState().getPhysicsSpace().add(landscape);
    }