Example #1
0
  public void render(float delta) {

    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    stage.act(delta);
    stage.draw();

    tweenManager.update(delta);
  }
Example #2
0
  @Override
  public void render(float delta) {
    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
    stage.act(delta);

    logoMenuBatch.begin();
    menuBGSprite.draw(logoMenuBatch);
    logoSprite.draw(logoMenuBatch);
    logoMenuBatch.end();

    butBatch.begin();
    stage.draw();
    butBatch.end();

    if (splashYes) {

      splashBatch.begin();
      splashBGSprite.draw(splashBatch);

      if ((fadeInOut < 1) && (fadeInOut > fadeCopy)) {
        System.out.println(fadeInOut);
        fadeCopy = fadeInOut;
        fadeInOut += 0.005;
        if (fadeInOut >= 1) fadeInOut = 1;

      } else {
        if (fadeInOut <= 0) splashYes = false;
        System.out.println(fadeInOut);
        fadeInOut -= 0.005;
        if (fadeInOut <= 0) {
          splashYes = false;
          fadeInOut = 0;
        }
      }

      splashSprite.setColor(1, 1, 1, fadeInOut);
      splashSprite.draw(splashBatch);
      splashBatch.end();
    }
  }