public void changed (ChangeEvent event, Actor actor) { stage.addAction(Actions.sequence(Actions.delay(2), Actions.run(new Runnable(){ public void run () { nextColor(); Gdx.app.log(str4, "RunnableAction executed"); } }))); }}); root.add(button4).row();
private void addEmitter( float[] colors, Texture particleTexture, Vector3 translation, Vector3 actionAxis, float actionRotation){ ParticleController controller = createBillboardController(colors, particleTexture); controller.init(); controller.start(); emitters.add(controller); controller.translate(translation); ui.addAction(new RotationAction(controller, actionAxis, actionRotation)); }
@Override public void show() { preShow(); Gdx.input.setInputProcessor(this.stage); Gdx.app.log(TAG, "show"); if (isFadeInEnabled()) { stage.getRoot().getColor().a = 0; stage.addAction(Actions.fadeIn(fadeInDuration)); } layoutFileChecksum = calculateLayoutFileChecksum(); postShow(); }
@Override public boolean act(float delta) { if (actionNext != null) { setScreen(nextScreen); nextScreen.getStage().addAction(actionNext); nextScreen.getStage().getRoot() .setTouchable(Touchable.enabled); isDisposeScreen = disposeScreen; } else { setScreen(nextScreen); nextScreen.getStage().getRoot() .setTouchable(Touchable.enabled); isDisposeScreen = disposeScreen; } return true; } }));
@LmlAfter void initView() { timerAction = new TimerAction(NOTIFICATION_CUTOFF, new Timer.Listener() { @Override public void onTimeUp() { updateProjectProperty(); } }); stage.addAction(timerAction); originalColor.set(modelService.getProject().getPreviewBackgroundColor()); selectedColor.set(originalColor); colorPicker.setColor(selectedColor); // Close dialog on ESC dialog.addListener(new InputListener() { @Override public boolean keyDown (InputEvent event, int keycode) { if (keycode == Input.Keys.ESCAPE) { onCancelClick(); return true; } return false; } }); VisImageButton btnClose = WidgetUtils.obtainCloseButton(dialog); btnClose.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { onCancelClick(); } }); }
@Override public void show() { viewport = new FitViewport(640, 480); stage = new Stage(viewport, batch); font = new BitmapFont(Gdx.files.internal("fonts/foo.fnt")); Label.LabelStyle labelStyle = new Label.LabelStyle(font, Color.WHITE); Label gameOverLabel = new Label("Game Over", labelStyle); gameOverLabel.setPosition((640 - gameOverLabel.getWidth()) / 2, 226f); GameManager.getInstance().playMusic("GameOver.ogg", false); stage.addActor(gameOverLabel); stage.addAction(Actions.sequence( Actions.delay(1f), Actions.fadeOut(2f), Actions.run(new Runnable() { @Override public void run() { game.setScreen(new MainMenuScreen(game)); } }))); }
stage.addAction(new SequenceAction(Actions.delay(0.2f), Actions.fadeOut(1f), runnableAction));
Image image = new Image(fadeOutTexture); stage.addActor(image); stage.addAction(Actions.fadeOut(0.5f));
stage.addActor(princessAnimImage); stage.addAction( Actions.sequence( Actions.delay(5f),