List of usage examples for com.badlogic.gdx.math Interpolation circleIn
Interpolation circleIn
To view the source code for com.badlogic.gdx.math Interpolation circleIn.
Click Source Link
From source file:broken.shotgun.throwthemoon.actors.Enemy.java
License:Open Source License
public void takeDamage(int direction) { health--;//w w w . j a v a 2 s .co m hitSfx.play(); if (health <= 0) { die(); return; } addAction(sequence( parallel(Actions.moveBy(20 * direction, 0, 0.3f, Interpolation.circleOut), sequence(color(Color.BLACK, 0.15f), color(Color.WHITE, 0.15f))), Actions.moveTo(getX(), getY(), 0.1f, Interpolation.circleIn))); }
From source file:com.alterego.jelly.screens.PlayGameScreen.java
License:Apache License
private void dropStar(Image img) { stars--;/*from w w w . ja v a 2 s . c om*/ img.setDrawable(new TextureRegionDrawable(Assets.instance.gameElements.starOff)); star.setPosition(img.getX() - 45, img.getY() - 50); star.addAction(Actions.sequence(Actions.scaleTo(0.3f, 0.3f), Actions.alpha(1f), Actions.parallel(Actions.rotateBy(210f, 0.9f), Actions.scaleTo(0.8f, 0.8f, 0.9f), Actions.moveTo(star.getX() - 45f, star.getY() - 210f, 1.2f), Actions.alpha(0f, 0.9f, Interpolation.circleIn)))); }
From source file:com.alterego.jelly.screens.PlayGameScreen.java
License:Apache License
private void updateFreeze() { freezers = LevelData.freezers;/*from w w w. jav a 2 s. c o m*/ freezes.setText(String.valueOf(freezers)); imgFreeze.addAction(Actions.sequence(Actions.scaleTo(0f, 0f), Actions.alpha(1f), Actions.parallel(Actions.rotateBy(360f, 0.7f), Actions.scaleTo(1f, 1f, 0.5f), Actions.alpha(0f, 1.0f, Interpolation.circleIn)))); }
From source file:com.strategames.catchdastars.dialogs.LevelCompleteDialog.java
License:Open Source License
private void calculateTotalAnimation(final int number, final ScoreActor scoreActor, final float y) { Action actionCountScore = new Action() { @Override// w ww . j av a 2s . c o m public boolean act(float delta) { int actorScore = scoreActor.getScoreItem().getScore(); if (actorScore > 0) { totalScore += actorScore; SoundEffect.getSoundForIncrement(actorScore).play(); totalScoreLabel.setText(String.valueOf(totalScore)); } return true; } }; Action actionRemoveActor = new Action() { @Override public boolean act(float delta) { actor.remove(); return true; } }; Actor actor = scoreActor.getActor(); if (number == 0) { actor.addAction(sequence(moveTo(actor.getX(), y, 1f - (0.1f * number), Interpolation.circleIn), actionCountScore, new Action() { @Override public boolean act(float delta) { animationController(); return true; } }, actionRemoveActor)); } else { actor.addAction(sequence(moveTo(actor.getX(), y, 1f - (0.1f * number), Interpolation.circleIn), actionCountScore, actionRemoveActor)); } }
From source file:com.trgk.touchwave.gamescene.HitFrame.java
License:Open Source License
@Override public void act(float delta) { super.act(delta); if (destroyed) return;//from w w w . j av a2 s .c o m // All touched -> remove if (allCirclesTouched()) { this.scene.frameGroup.killFrame(this); this.destroyed = true; // Destroy animations this.clearActions(); this.addAction( Actions.parallel(Actions.sequence(Actions.delay(0.1f), Actions.touchable(Touchable.disabled)), Actions.sequence(Actions.alpha(1), Actions.fadeOut(0.3f, Interpolation.exp10Out), Actions.removeActor()))); for (HitCircle circle : circles) { circle.clearActions(); circle.addAction(Actions.scaleTo(3f, 3f, 0.3f, Interpolation.circleIn)); } } }
From source file:com.vlaaad.dice.game.world.view.visualizers.actions.TeleportVisualizer.java
License:Open Source License
@Override public IFuture<Void> visualize(final TeleportResult result) { final Future<Void> future = new Future<Void>(); final Actor in = new AnimationSubView(0.125f, compose("animation/teleport-in"), Animation.PlayMode.NORMAL) .getActor();/*from w ww. j a v a 2 s. c o m*/ in.setPosition( result.creature.getX() * ViewController.CELL_SIZE + (ViewController.CELL_SIZE - in.getWidth()) / 2, result.creature.getY() * ViewController.CELL_SIZE + ViewController.CELL_SIZE * 1.5f); visualizer.viewController.effectLayer.addActor(in); in.addListener(new AnimationListener() { @Override protected void onAnimationEvent(AnimationEvent event) { in.remove(); } }); WorldObjectView view = visualizer.viewController.getView(result.creature); visualizer.viewController.scroller.centerOn(result.creature); view.addAction(Actions.sequence(Actions.delay(0.625f), Actions.run(new Runnable() { @Override public void run() { SoundManager.instance.playSound("ability-teleport"); } }), Actions.parallel(Actions.alpha(0, 0.5f, Interpolation.circleOut), Actions.moveBy(0, MOVE_OFFSET, 0.5f)), Actions.moveTo(result.coordinate.x() * ViewController.CELL_SIZE, result.coordinate.y() * ViewController.CELL_SIZE + MOVE_OFFSET), Actions.run(new Runnable() { @Override public void run() { final Actor out = new AnimationSubView(0.125f, compose("animation/teleport-out"), Animation.PlayMode.NORMAL).getActor(); out.setPosition( result.coordinate.x() * ViewController.CELL_SIZE + (ViewController.CELL_SIZE - out.getWidth()) / 2, result.coordinate.y() * ViewController.CELL_SIZE + ViewController.CELL_SIZE * 1.5f); visualizer.viewController.scroller.centerOn(result.coordinate); visualizer.viewController.effectLayer.addActor(out); out.addListener(new AnimationListener() { @Override protected void onAnimationEvent(AnimationEvent event) { out.remove(); } }); } }), Actions.delay(0.625f), Actions.run(new Runnable() { @Override public void run() { SoundManager.instance.playSound("ability-teleport"); } }), Actions.parallel(Actions.alpha(1f, 0.5f, Interpolation.circleIn), Actions.moveBy(0, -MOVE_OFFSET + 2, 0.5f)), Actions.run(new Runnable() { @Override public void run() { future.happen(); } }))); return future; }
From source file:es.eucm.ead.engine.systems.effects.transitions.ScaleAndFade.java
License:Open Source License
private void initialize(float duration, boolean out) { this.out = out; this.duration = duration; this.easing = out ? Interpolation.circleOut : Interpolation.circleIn; }
From source file:net.mwplay.cocostudio.ui.CocoStudioUIEditor.java
License:Apache License
/** * ??/* ww w . ja v a 2 s . co m*/ */ public Interpolation getInterpolation(int tweenType) { switch (tweenType) { case 0: return Interpolation.linear; case 1: return Interpolation.sineIn; case 2: return Interpolation.sineOut; case 3: return Interpolation.sine; case 4: return Interpolation.linear; //??Quad_EaseIn case 5: return Interpolation.linear; //??Quad_EaseOut case 6: return Interpolation.linear; //??Quad_EaseInOut case 7: return Interpolation.linear; //??Cubic_EaseIn case 8: return Interpolation.linear; //??Cubic_EaseOut case 9: return Interpolation.linear; //??Cubic_EaseInOut case 10: return Interpolation.linear; //??Quart_EaseIn case 11: return Interpolation.linear; //??Quart_EaseOut case 12: return Interpolation.linear; //??Quart_EaseInOut case 13: return Interpolation.linear; //??Quint_EaseIn case 14: return Interpolation.linear; //??Quint_EaseOut case 15: return Interpolation.linear; //??Quint_EaseInOut case 16: return Interpolation.exp10In; case 17: return Interpolation.exp10Out; case 18: return Interpolation.exp10; case 19: return Interpolation.circleIn; case 20: return Interpolation.circleOut; case 21: return Interpolation.circle; case 22: return Interpolation.elasticIn; case 23: return Interpolation.elasticOut; case 24: return Interpolation.elastic; case 25: return Interpolation.linear; //??Back_EaseIn case 26: return Interpolation.linear; //??Back_EaseOut case 27: return Interpolation.linear; //??Back_EaseInOut case 28: return Interpolation.bounceIn; case 29: return Interpolation.bounceOut; case 30: return Interpolation.bounce; default: return Interpolation.linear; } }
From source file:org.pidome.client.photoframe.screens.photoscreen.actors.PhotosActor.java
public Interpolation getRandomInterpolation() { switch (new Random().nextInt(20)) { case 0:/*from w w w .ja va 2s .co m*/ return Interpolation.bounce; case 1: return Interpolation.bounceIn; case 2: return Interpolation.bounceOut; case 3: return Interpolation.circle; case 4: return Interpolation.circleIn; case 5: return Interpolation.circleOut; case 6: return Interpolation.exp10; case 7: return Interpolation.exp10In; case 8: return Interpolation.exp10Out; case 9: return Interpolation.exp5; case 10: return Interpolation.exp5In; case 11: return Interpolation.exp5Out; case 12: return Interpolation.fade; case 13: return Interpolation.linear; case 14: return Interpolation.sine; case 15: return Interpolation.sineIn; case 16: return Interpolation.sineOut; case 17: return Interpolation.swing; case 18: return Interpolation.swingIn; case 19: return Interpolation.swingOut; default: return Interpolation.linear; } }