示例#1
0
  protected void loadGameInfo() throws Exception {
    Engine engine = Engine.getSharedInstance(); // Singleton!
    GameInfo gameInfo = new HelloWorldGameInfo();

    engine.pushInputController((InputController) gameInfo);
    gameInfo.onGameStart();
    engine.setGameInfo(gameInfo);
  }
  public HelloWorldGameInfo() throws Exception {
    _gameScene = new Scene();

    /* _gameScene.init(_domeSize, R.raw.skydome1, R.raw.skydome2,
    R.raw.skydome3, R.raw.skydome4, R.raw.skydome5, R.raw.skydome6);  */

    Engine.getSharedInstance().pushScene(_gameScene);

    _currentCamera = new Camera();
    _currentCamera.setValues(new Vector3(0.0f, 0.0f, -8.0f), 1.5f, 4.0f / 3.0f, 1.f, 1100.f);

    _currentCamera.setViewportSize(
        Engine.getSharedInstance().getViewWidth(), Engine.getSharedInstance().getViewHeight());

    Engine.getSharedInstance().setCurrentCamera(_currentCamera);
    Engine.getSharedInstance().getRenderService().setClearColor(new Vector4(0.0f, 0.0f, 0.3f, 0.f));
  }