public static Scene scene() throws SAXException, ParserConfigurationException, IOException { Scene scene = Scene.node(); CSampleMap map = CSampleMapXml.getInstance().read("xml/000040000.xml"); // map.setPosition(-2848.0f,-5.0f); map.init(); scene.addChild(map); return scene; }
@Override public void onStart() { super.onStart(); // attach the OpenGL view to a window Director.sharedDirector().attachInView(mGLSurfaceView); // set landscape mode Director.sharedDirector().setLandscape(false); // show FPS Director.sharedDirector().setDisplayFPS(true); // frames per second Director.sharedDirector().setAnimationInterval(1.0f / 60); Scene scene = Scene.node(); scene.addChild(nextAction()); // Make the Scene active Director.sharedDirector().runWithScene(scene); }
public void backCallback() { Scene s = Scene.node(); s.addChild(backAction()); Director.sharedDirector().replaceScene(s); }
public static void restartCallback() { Scene s = Scene.node(); s.addChild(restartAction()); Director.sharedDirector().replaceScene(s); }