@Override
  public final void onCreateScene(final OnCreateSceneCallback pOnCreateSceneCallback)
      throws IOException {
    final Scene scene = this.onCreateScene();

    pOnCreateSceneCallback.onCreateSceneFinished(scene);
  }
Example #2
0
 @Override
 public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
   // Active GCM message reception
   Log.d("GAME", "PUTAIN DE MERDE ..............................................");
   GCMConnector.connect();
   enableVibrator();
   initSplashScene();
   pOnCreateSceneCallback.onCreateSceneFinished(this.mCurrentScene);
 }
Example #3
0
  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
    this.mEngine.registerUpdateHandler(new FPSLogger());

    scene = new Scene();
    scene.setBackground(new Background(0.09804f, 0.6274f, 0.8784f));

    final float centerX = (CAMERA_WIDTH - this.mFaceTextureRegion.getWidth()) / 2;
    final float centerY = (CAMERA_HEIGHT - this.mFaceTextureRegion.getHeight()) / 2;
    final Sprite face =
        new Sprite(centerX, centerY, this.mFaceTextureRegion, this.getVertexBufferObjectManager());
    final PhysicsHandler physicsHandler = new PhysicsHandler(face);
    face.registerUpdateHandler(physicsHandler);

    scene.attachChild(face);

    final AnalogOnScreenControl analogOnScreenControl =
        new AnalogOnScreenControl(
            0,
            CAMERA_HEIGHT - this.mOnScreenControlBaseTextureRegion.getHeight(),
            this.mCamera,
            this.mOnScreenControlBaseTextureRegion,
            this.mOnScreenControlKnobTextureRegion,
            0.1f,
            200,
            this.getVertexBufferObjectManager(),
            new IAnalogOnScreenControlListener() {
              @Override
              public void onControlChange(
                  final BaseOnScreenControl pBaseOnScreenControl,
                  final float pValueX,
                  final float pValueY) {
                physicsHandler.setVelocity(pValueX * 100, pValueY * 100);
              }

              @Override
              public void onControlClick(final AnalogOnScreenControl pAnalogOnScreenControl) {
                face.registerEntityModifier(
                    new SequenceEntityModifier(
                        new ScaleModifier(0.25f, 1, 1.5f), new ScaleModifier(0.25f, 1.5f, 1)));
              }
            });
    analogOnScreenControl
        .getControlBase()
        .setBlendFunction(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
    analogOnScreenControl.getControlBase().setAlpha(0.5f);
    analogOnScreenControl.getControlBase().setScaleCenter(0, 128);
    analogOnScreenControl.getControlBase().setScale(1.25f);
    analogOnScreenControl.getControlKnob().setScale(1.25f);
    analogOnScreenControl.refreshControlKnobPosition();

    scene.setChildScene(analogOnScreenControl);

    pOnCreateSceneCallback.onCreateSceneFinished(scene);
  }
Example #4
0
  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
    startMenuScene = new Scene();
    gameInstanceScene = new Scene();
    endGameScene = new Scene();
    currentScenario = new StartMenuScenario(this, startMenuScene, prepareLoadGameInstanceCallback);
    hud = new HUD();
    camera.setHUD(hud);

    pOnCreateSceneCallback.onCreateSceneFinished(startMenuScene);
  }
Example #5
0
  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
    // TODO Auto-generated method stub

    this.mEngine.registerUpdateHandler(new FPSLogger());

    // createPopUpMenuScene();
    createStaticMenuScene();
    sprBanana = new AnimatedSprite(0, 0, regBanana, this.getVertexBufferObjectManager());
    sprBanana.setPosition(140, 120);

    this.mainMenuScene = new Scene();
    this.mainMenuScene.setBackground(new Background(0, 0, 0));

    Sprite menuBack =
        new Sprite(0, 0, this.mMenuTextureRegion, this.getVertexBufferObjectManager());

    this.mainMenuScene.attachChild(menuBack);
    this.mainMenuScene.getLastChild().attachChild(sprBanana);
    sprBanana.animate(100);
    this.mainMenuScene.setChildScene(mStaticMenuScene);
    pOnCreateSceneCallback.onCreateSceneFinished(mainMenuScene);
  }
 // ===========================================================
 // Create Scene -> creates the Splash Scene
 // ===========================================================
 @Override
 public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws Exception {
   //                    creates the splash scene ------------\
   pOnCreateSceneCallback.onCreateSceneFinished(sceneManager.createSplashScene());
 }
  @Override
  public void onCreateScene(OnCreateSceneCallback pOnCreateSceneCallback) throws IOException {

    man.setCurrentScene(new MenuScreen(camera, this, man));
    pOnCreateSceneCallback.onCreateSceneFinished(man.getScene());
  }