Examples of KeyTrigger


Examples of com.jme3.input.controls.KeyTrigger

            //flyCam = new FlyByCamera(cam);
            //flyCam.setMoveSpeed(1f);
            //flyCam.registerWithInput(inputManager);

            if (context.getType() == Type.Display) {
                inputManager.addMapping("SIMPLEAPP_Exit", new KeyTrigger(KeyInput.KEY_ESCAPE));
            }
          
            inputManager.addMapping("SIMPLEAPP_CameraPos", new KeyTrigger(KeyInput.KEY_C));
            inputManager.addMapping("SIMPLEAPP_Memory", new KeyTrigger(KeyInput.KEY_M));
            inputManager.addListener(actionListener, "SIMPLEAPP_Exit",
                    "SIMPLEAPP_CameraPos", "SIMPLEAPP_Memory");
        }
   
        //create the Core
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setTexture("ColorMap", offTex);
        g.setMaterial(mat);
        rootNode.attachChild(g);
        inputManager.addMapping(TOGGLE_UPDATE, new KeyTrigger(KeyInput.KEY_SPACE));
        inputManager.addListener(this, TOGGLE_UPDATE);
    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        if (inputManager.hasMapping("SIMPLEAPP_Exit")) {
            inputManager.deleteMapping("SIMPLEAPP_Exit");
        }

        inputManager.addMapping(PAUSE, new KeyTrigger(KeyInput.KEY_ESCAPE),
                new KeyTrigger(KeyboardInputEvent.KEY_PAUSE),
                new KeyTrigger(KeyboardInputEvent.KEY_P));
        inputManager.addMapping(NEXT_LEVEL, new KeyTrigger(KeyInput.KEY_F2));
        inputManager.addMapping(PREVIOUS_LEVEL, new KeyTrigger(KeyInput.KEY_F1));

        inputManager.addListener(actionListener, PAUSE, NEXT_LEVEL, PREVIOUS_LEVEL);

    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

    this.inputManager = inputManager;
    inputManager.addMapping("MouseToTuio_Active", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
    inputManager.addListener(this, "MouseToTuio_Active");
    inputManager.addMapping("MouseToTuio_Right_Active", new MouseButtonTrigger(MouseInput.BUTTON_RIGHT));
    inputManager.addListener(this, "MouseToTuio_Right_Active");
    inputManager.addMapping("SIMPLEAPP_Zoom", new KeyTrigger(KeyInput.KEY_UP));
    inputManager.addListener(this, "SIMPLEAPP_Zoom");
        inputManager.addMapping("SIMPLEAPP_ZoomMin", new KeyTrigger(KeyInput.KEY_DOWN));
        inputManager.addListener(this, "SIMPLEAPP_ZoomMin");
  }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        boolean isMoving = left || right || up || down;
        GameState.setMoving(isMoving);
    }

    private void addDesktopInputs() {
        inputManager.addMapping(LEFT_MOVE, new KeyTrigger(KeyInput.KEY_A));
        inputManager.addMapping(RIGHT_MOVE, new KeyTrigger(KeyInput.KEY_D));
        inputManager.addMapping(FORWARD_MOVE, new KeyTrigger(KeyInput.KEY_W));
        inputManager.addMapping(BACKWARD_MOVE, new KeyTrigger(KeyInput.KEY_S));
        inputManager.addMapping(JUMP, new KeyTrigger(KeyInput.KEY_SPACE));
        inputManager.addListener(this, LEFT_MOVE, RIGHT_MOVE, FORWARD_MOVE, BACKWARD_MOVE, JUMP);
    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

      }
     
      System.out.println("EntityNavManager finished");
     
        inputManager.addListener(this, "print_scenegraph", "print_cam_location", "print_bboxes", "toggle_navmesh", "drop_a_box", "toggle_navbodermesh");
        inputManager.addMapping("print_scenegraph", new KeyTrigger(KeyInput.KEY_F6));
        inputManager.addMapping("print_cam_location", new KeyTrigger(KeyInput.KEY_F1));
        inputManager.addMapping("print_bboxes", new KeyTrigger(KeyInput.KEY_F7));
        inputManager.addMapping("toggle_navmesh", new KeyTrigger(KeyInput.KEY_F8));
        inputManager.addMapping("drop_a_box", new KeyTrigger(KeyInput.KEY_F9));
        inputManager.addMapping("toggle_navbodermesh", new KeyTrigger(KeyInput.KEY_F10));
       
        rootNode.attachChild(bboxes);
        rootNode.attachChild(navs);
    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        ambLight.setColor(new ColorRGBA(0.1f, 0.1f, 0.1f, 1f));
        rootNode.addLight(ambLight);
     
     
        inputManager.addListener(this, "print_scenegraph", "print_cam_location", "print_bboxes", "toggle_navmesh", "toggle_navbodermesh", "nextMesh");
        inputManager.addMapping("print_scenegraph", new KeyTrigger(KeyInput.KEY_F6));
        inputManager.addMapping("print_cam_location", new KeyTrigger(KeyInput.KEY_F1));
        inputManager.addMapping("print_bboxes", new KeyTrigger(KeyInput.KEY_F7));
        inputManager.addMapping("toggle_navmesh", new KeyTrigger(KeyInput.KEY_F8));
        inputManager.addMapping("nextMesh", new KeyTrigger(KeyInput.KEY_F9));
        inputManager.addMapping("toggle_navbodermesh", new KeyTrigger(KeyInput.KEY_F10));
       
//        rootNode.attachChild(bboxes);
        rootNode.attachChild(nav);
      rootNode.attachChild(border);
     }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

       System.out.println("tile z=176 should be world 8192:"+getWorldPositionOfZTile(176));
       System.out.println("tile z=177 should be world 8448:"+getWorldPositionOfZTile(177));*/
        NavTestHelper.debugShowBox(assetManager, debugNodes, new Vector3f(-9984f+IArea.TERRAIN_SIZE_HALF,0f,8448f-IArea.TERRAIN_SIZE_HALF), ColorRGBA.LightGray, IArea.TERRAIN_SIZE_HALF, 0.1f, IArea.TERRAIN_SIZE_HALF);

        inputManager.addListener(this, "print_scenegraph");
        inputManager.addMapping("print_scenegraph", new KeyTrigger(KeyInput.KEY_F6));

    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        rootNode.addLight(dr);
        setupScene();
       
        inputManager.addListener(this, "print_scenegraph", "add_model", "remove_model", "toggle_singleStep", "advance_singleStep");
        inputManager.addMapping("print_scenegraph", new KeyTrigger(KeyInput.KEY_F6));
        inputManager.addMapping("add_model", new KeyTrigger(KeyInput.KEY_F9));
        inputManager.addMapping("remove_model", new KeyTrigger(KeyInput.KEY_F10));
       
        inputManager.addMapping("toggle_singleStep", new KeyTrigger(KeyInput.KEY_1));
        inputManager.addMapping("advance_singleStep", new KeyTrigger(KeyInput.KEY_0));
        JMEAnimationController.singleStep = false;
    }
View Full Code Here

Examples of com.jme3.input.controls.KeyTrigger

        setupScene();
       
        inputManager.addListener(this, "print_bboxes", "add_model", "remove_model""next_entity", "prev_entity");
       
        inputManager.addMapping("print_bboxes", new KeyTrigger(KeyInput.KEY_F6));
       
        inputManager.addMapping("add_model", new KeyTrigger(KeyInput.KEY_F9));
        inputManager.addMapping("remove_model", new KeyTrigger(KeyInput.KEY_F10));
       
        inputManager.addMapping("next_entity", new KeyTrigger(KeyInput.KEY_ADD));
        inputManager.addMapping("prev_entity", new KeyTrigger(KeyInput.KEY_SUBTRACT));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.