コード例 #1
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);
  }
コード例 #2
0
 public void backCallback() {
   Scene s = Scene.node();
   s.addChild(backAction());
   Director.sharedDirector().replaceScene(s);
 }
コード例 #3
0
 public static void restartCallback() {
   Scene s = Scene.node();
   s.addChild(restartAction());
   Director.sharedDirector().replaceScene(s);
 }