@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); System.out.println("Initialized"); }
@Override public void initialize(AppStateManager stateManager, Application app) { if (rootNode == null) { rootNode = new Node("Root Node"); } if (viewPort == null) { viewPort = app.getViewPort(); } viewPort.attachScene(rootNode); super.initialize(stateManager, app); }
@Override public void initialize(AppStateManager stateManager, Application app) { if (!super.isInitialized()){ InputManager inputManager = app.getInputManager(); inputManager.addMapping("ScreenShot", new KeyTrigger(KeyInput.KEY_SYSRQ)); inputManager.addListener(this, "ScreenShot"); List<ViewPort> vps = app.getRenderManager().getPostViews(); ViewPort last = vps.get(vps.size()-1); last.addProcessor(this); if (shotName == null) { shotName = app.getClass().getSimpleName(); } } super.initialize(stateManager, app); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.oldTimer = app.getTimer(); app.setTimer(new IsoTimer(framerate)); if (file == null) { String filename = System.getProperty("user.home") + File.separator + "jMonkey-" + System.currentTimeMillis() / 1000 + ".avi"; file = new File(filename); } processor = new VideoProcessor(); List<ViewPort> vps = app.getRenderManager().getPostViews(); for (int i = vps.size() - 1; i >= 0; i-- ) { lastViewPort = vps.get(i); if (lastViewPort.isEnabled()) { break; } } lastViewPort.addProcessor(processor); }
@Override public void initialize(AppStateManager stateManager, Application app) { renderManager = app.getRenderManager(); assetManager = app.getAssetManager(); inputManager = app.getInputManager(); for (Binding binding : bindings) { bind(binding); } super.initialize(stateManager, app); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.oldTimer = app.getTimer(); app.setTimer(new IsoTimer(framerate)); if (file == null) { String filename = JmeSystem.getStorageFolder(JmeSystem.StorageFolderType.External) + File.separator + "jMonkey-" + System.currentTimeMillis() / 1000 + ".avi"; logger.log(Level.INFO, "fileName: {0}", filename); file = new File(filename); } processor = new VideoProcessor(); List<ViewPort> vps = app.getRenderManager().getPostViews(); for (int i = vps.size() - 1; i >= 0; i-- ) { lastViewPort = vps.get(i); if (lastViewPort.isEnabled()) { break; } } lastViewPort.addProcessor(processor); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; if (app.getInputManager() != null) { if (flyCam == null) { flyCam = new FlyByCamera(app.getCamera()); } flyCam.registerWithInput(app.getInputManager()); } }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; if (app instanceof SimpleApplication) { SimpleApplication simpleApp = (SimpleApplication)app; if (guiNode == null) { guiNode = simpleApp.guiNode; } if (guiFont == null ) { guiFont = simpleApp.guiFont; } } if (guiNode == null) { throw new RuntimeException( "No guiNode specific and cannot be automatically determined." ); } if (guiFont == null) { guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt"); } loadFpsText(); loadStatsView(); loadDarken(); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); //only generate data and attach node when we are actually attached (or picking) initData(); application = (SimpleApplication) app; application.getRootNode().attachChild(getRootNode()); application.getStateManager().attach(physicsState); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app);
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.inputManager = app.getInputManager(); if (app.getInputManager() != null) { inputManager.addMapping(INPUT_MAPPING_CAMERA_POS, new KeyTrigger(KeyInput.KEY_C)); inputManager.addMapping(INPUT_MAPPING_MEMORY, new KeyTrigger(KeyInput.KEY_M)); inputManager.addListener(keyListener, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_MEMORY); } }
/** * Initialize this state prior to its 1st update. Should be invoked only by * a subclass or by the AppStateManager. * * @param stateManager the manager for this state (not null) * @param app the application which owns this state (not null) */ @Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.rm = app.getRenderManager(); this.assetManager = app.getAssetManager(); setupMaterials(app); physicsDebugRootNode.setCullHint(Spatial.CullHint.Never); viewPort = rm.createMainView("Physics Debug Overlay", app.getCamera()); viewPort.setClearFlags(false, true, false); viewPort.attachScene(physicsDebugRootNode); }
/** * Initialize this state prior to its 1st update. Should be invoked only by * a subclass or by the AppStateManager. * * @param stateManager the manager for this state (not null) * @param app the application which owns this state (not null) */ @Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.rm = app.getRenderManager(); this.assetManager = app.getAssetManager(); setupMaterials(app); physicsDebugRootNode.setCullHint(Spatial.CullHint.Never); viewPort = rm.createMainView("Physics Debug Overlay", app.getCamera()); viewPort.setClearFlags(false, true, false); viewPort.attachScene(physicsDebugRootNode); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.inputManager = app.getInputManager(); target = new Node("ChaseCamTarget"); camNode.setCamera(app.getCamera()); camNode.setControlDir(CameraControl.ControlDirection.SpatialToCamera); target.attachChild(camNode); camNode.setLocalTranslation(0, 0, distance); upVector = app.getCamera().getUp().clone(); leftVector = app.getCamera().getLeft().clone(); registerWithInput(); rotateCamera(); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; this.stateManager = stateManager; renderThread = Thread.currentThread(); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = (Main) app; this.stateManager = stateManager; // Start connecting connector = new Connector(); connector.start(); }
@Override public void initialize(AppStateManager stateManager, Application app) { if (!super.isInitialized()) { viewport.addProcessor(this); } super.initialize(stateManager, app); }
@Override public void initialize(AppStateManager stateManager, Application app) { if (rootNode == null) { rootNode = new Node("Root Node"); } if (viewPort == null) { viewPort = app.getViewPort(); } viewPort.attachScene(rootNode); super.initialize(stateManager, app); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.stateManager = stateManager; this.app = (Main) app; // Get all the map thing triggers thingTriggers = initTriggers(this.stateManager.getState(GameState.class).getLevelData().getThings(), stateManager); }
@Override public void initialize(AppStateManager stateManager, Application app) { if (!super.isInitialized()) { InputManager inputManager = app.getInputManager(); inputManager.addMapping("ScreenShot", new KeyTrigger(KeyInput.KEY_SYSRQ)); inputManager.addListener(this, "ScreenShot"); List<ViewPort> vps = app.getRenderManager().getPostViews(); ViewPort last = vps.get(vps.size() - 1); last.addProcessor(this); } super.initialize(stateManager, app); }