Java 类com.badlogic.gdx.scenes.scene2d.actions.RunnableAction 实例源码

项目:Klooni1010    文件:PauseMenuStage.java   
private void hide() {
    shown = false;
    hiding = true;
    Gdx.input.setInputProcessor(lastInputProcessor);

    addAction(Actions.sequence(
            Actions.moveTo(0, Gdx.graphics.getHeight(), 0.5f, Interpolation.swingIn),
            new RunnableAction() {
                @Override
                public void run() {
                    hiding = false;
                }
            }
    ));
    scorer.resume();
}
项目:ingress-indonesia-dev    文件:ModalDialog.java   
public final void e()
{
  if (this.e == null)
    this.a = false;
  while (true)
  {
    return;
    an.b(this.f);
    Table localTable = this.e;
    RunnableAction localRunnableAction = new RunnableAction();
    localRunnableAction.setRunnable(new y(this, localTable));
    localTable.addAction(Actions.sequence(Actions.fadeOut(0.25F), localRunnableAction));
    this.f = false;
    Iterator localIterator = this.b.iterator();
    while (localIterator.hasNext())
      ((aa)localIterator.next()).b();
  }
}
项目:penguins-in-space    文件:GameView.java   
private void resumeGame() {
    pauseButton.addAction(Actions.sequence(Actions.visible(true), Actions.fadeIn(1)));
    mainMenuCell.getActor().addAction(Actions.sequence(Actions.fadeOut(1), Actions.visible(false), new RunnableAction() {
        @Override
        public void run() {
            inputHandler.onResume();
        }
    }));

}
项目:Tower-Defense-Galaxy    文件:MessageWindow.java   
@Override
public void act(float delta) {
    super.act(delta);
    table.act(delta);
    switch (state) {
        case 0:
            if(!Gdx.input.isTouched())
                state++;
            break;
        case 1:
            if(Gdx.input.isTouched())
                state++;
            break;
        case 2:
            if(!Gdx.input.isTouched()) {
                AlphaAction action = new AlphaAction();
                action.setAlpha(0f);
                action.setDuration(0.3f);
                addAction(new SequenceAction(action, new RunnableAction() {
                    @Override
                    public void run() {
                        remove();
                    }
                }));
                state++;
            }
            break;
    }
}
项目:skin-composer    文件:DialogLoading.java   
@Override
public Dialog show(Stage stage) {
    Dialog dialog = super.show(stage);
    RunnableAction runnableAction = new RunnableAction();
    runnableAction.setRunnable(() -> {
        if (runnable != null) {
            runnable.run();
        }
        hide();
    });
    Action action = new SequenceAction(new DelayAction(.5f), runnableAction);
    addAction(action);

    return dialog;
}
项目:SaveUA    文件:SplashScreen.java   
@Override
public void resize(int width, int height) {
    stage.getViewport().update(width, height, true);

    float scale = Math.min(width, height) / (logoImage.getWidth() * 1.3f);
    if (scale < 1) {
        logoImage.setScale(scale);
    } else {
        scale = 1;
    }
    logoImage.setPosition(width / 2 - logoImage.getWidth() / 2 * scale,
            height / 2 - logoImage.getHeight() / 2 * scale);
    logoImage.clearActions();
    logoImage.getColor().a = 0;
    logoImage.setScale(scale, 0.3f * scale);
    Action act = sequence(parallel(alpha(1, 3), scaleTo(scale, scale, 2)),
            delay(0.5f), parallel(alpha(0, 0.7f)), new RunnableAction() {
                @Override
                public void run() {
                    manager.showMenu();
                }
            });
    logoImage.addAction(act);

    label.getColor().a = 0;
    label.setPosition(width / 2 - label.getWidth() / 2, 10);
    label.addAction(sequence(alpha(0.5f, 2), alpha(0, 2)));
}
项目:droidtowers    文件:SplashCloudLayer.java   
private Action makeFlyAction(final Image cloud) {
    Action moveTo = Actions.moveTo(worldSize.x, cloud.getY(), MathUtils.random(30f, 45f));
    RunnableAction finished = Actions.run(new Runnable() {
        @Override
        public void run() {
            cloud.remove();
        }
    });

    return Actions.sequence(Actions.fadeIn(0.15f), moveTo, finished);
}
项目:penguins-in-space    文件:BaseMenuView.java   
public void startAction(RunnableAction action) {
    table.addAction(new SequenceAction(getDefaultHideAnimation(), action));
}