use of com.badlogic.gdx.scenes.scene2d.actions.AlphaAction in project skin-composer by raeleus.
the class RootTable method display.
private void display(final String text) {
SequenceAction sequenceAction = new SequenceAction();
if (statusLabel.isVisible()) {
statusLabel.clearActions();
AlphaAction alphaAction = new AlphaAction();
alphaAction.setAlpha(0.0f);
alphaAction.setDuration(.25f);
sequenceAction.addAction(alphaAction);
RunnableAction runnableAction = new RunnableAction();
runnableAction.setRunnable(() -> {
statusLabel.setText(text);
});
sequenceAction.addAction(runnableAction);
alphaAction = new AlphaAction();
alphaAction.setAlpha(1.0f);
alphaAction.setDuration(.25f);
sequenceAction.addAction(alphaAction);
DelayAction delayAction = new DelayAction();
delayAction.setDuration(3.0f);
sequenceAction.addAction(delayAction);
alphaAction = new AlphaAction();
alphaAction.setAlpha(0.0f);
alphaAction.setDuration(1.5f);
sequenceAction.addAction(alphaAction);
VisibleAction visibleAction = new VisibleAction();
visibleAction.setVisible(false);
sequenceAction.addAction(visibleAction);
} else {
statusLabel.setText(text);
statusLabel.clearActions();
statusLabel.setVisible(true);
AlphaAction alphaAction = new AlphaAction();
alphaAction.setAlpha(1.0f);
alphaAction.setDuration(.5f);
sequenceAction.addAction(alphaAction);
DelayAction delayAction = new DelayAction();
delayAction.setDuration(3.0f);
sequenceAction.addAction(delayAction);
alphaAction = new AlphaAction();
alphaAction.setAlpha(0.0f);
alphaAction.setDuration(1.5f);
sequenceAction.addAction(alphaAction);
VisibleAction visibleAction = new VisibleAction();
visibleAction.setVisible(false);
sequenceAction.addAction(visibleAction);
}
statusLabel.addAction(sequenceAction);
}
use of com.badlogic.gdx.scenes.scene2d.actions.AlphaAction in project Eidolons by IDemiurge.
the class DeathAnim method add.
@Override
protected void add() {
if (getActor() == null) {
return;
}
// AnimMaster.getInstance().addActor(getActor());
// getActor().setPosition(getOrigin().x, getOrigin().y);
AlphaAction action = ActorMaster.addFadeOutAction(getActor());
action.setDuration(duration);
ActorMaster.addRemoveAfter(getActor());
}
use of com.badlogic.gdx.scenes.scene2d.actions.AlphaAction in project Eidolons by IDemiurge.
the class Weapon3dAnim method getAction.
@Override
protected Action getAction() {
setColor(new Color(1, 1, 1, 1));
AlphaAction alphaAction = (AlphaAction) ActorMaster.getAction(AlphaAction.class);
alphaAction.setDuration(getDuration() / 2);
alphaAction.setAlpha(0);
DelayAction delayed = new DelayAction(getDuration() / 2);
delayed.setAction(alphaAction);
return delayed;
}
use of com.badlogic.gdx.scenes.scene2d.actions.AlphaAction in project skin-composer by raeleus.
the class MenuList method hide.
public void hide() {
// fade out and then remove
clearActions();
AlphaAction alphaAction = new AlphaAction();
alphaAction.setAlpha(0.0f);
alphaAction.setDuration(.3f);
alphaAction.setInterpolation(Interpolation.fade);
RemoveActorAction removeAction = new RemoveActorAction();
removeAction.setActor(this);
SequenceAction sequenceAction = new SequenceAction(alphaAction, removeAction);
addAction(sequenceAction);
}
Aggregations