Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
  @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);
  }
Exemplo n.º 3
0
 public void backCallback() {
   Scene s = Scene.node();
   s.addChild(backAction());
   Director.sharedDirector().replaceScene(s);
 }
Exemplo n.º 4
0
 public static void restartCallback() {
   Scene s = Scene.node();
   s.addChild(restartAction());
   Director.sharedDirector().replaceScene(s);
 }