private void play() { AlphaAction alphaAction = new AlphaAction(); alphaAction.setAlpha(0); alphaAction.setDuration(0.5f); play.addAction(alphaAction); play.setTouchable(Touchable.disabled); MoveToAction moveToAction = new MoveToAction(); moveToAction.setPosition(gameTitle.getX(), HEIGHT * 12 / 13 - gameTitle.getHeight()); moveToAction.setDuration(2); gameTitle.addAction(moveToAction); Timer.instance().clear(); gameTitle.setText("L'Odyssée des Maths"); currentState = State.TRANSITION; }
public final void b(boolean paramBoolean) { a(); float f; AlphaAction localAlphaAction; if (paramBoolean) { f = 1.0F; localAlphaAction = Actions.alpha(f, 0.5F, Interpolation.fade); if (!paramBoolean) break label60; } label60: for (this.c = Actions.sequence(Actions.visible(true), localAlphaAction, Actions.touchable(this.b)); ; this.c = Actions.sequence(Actions.touchable(Touchable.disabled), localAlphaAction, Actions.visible(false))) { this.a.addAction(this.c); return; f = 0.0F; break; } }
@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; } }
private void showScore() { table.clear(); scoreLabel = new Label(Integer.toString(score), skin, "score"); scoreLabel.setColor(1.0f, 1.0f, 1.0f, 0.0f); table.add(scoreLabel).padTop(30.0f).expandY().top(); AlphaAction alphaAction = new AlphaAction(); alphaAction.setAlpha(1.0f); alphaAction.setDuration(.5f); scoreLabel.addAction(alphaAction); }
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); }
public void rocketPlatformOnAnimation(){ MoveToAction action = Actions.action(MoveToAction.class); action.setPosition(-100, 100); action.setDuration(1f); game.platform.addAction(action); AlphaAction action6 = Actions.action(AlphaAction.class); // action6.setRotation(90f); action6.setColor(Color.CLEAR); action6.setDuration(1f); game.platform.addAction(action6); }
public static AlphaAction alphaAction(Color destination, float newAlpha) { AlphaAction alpha = Actions.alpha(newAlpha); alpha.setColor(destination); return alpha; }
public static AlphaAction alphaAction(Color destination, float newAlpha, float time) { AlphaAction alpha = Actions.alpha(newAlpha, time); alpha.setColor(destination); return alpha; }
public static AlphaAction alphaAction(Color destination, float newAlpha, float time, Interpolation interpolation) { AlphaAction alpha = Actions.alpha(newAlpha, time, interpolation); alpha.setColor(destination); return alpha; }