diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-09 11:48:52 +0200 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-09 11:48:52 +0200 | 
| commit | 909d7771fa7a5e65bc7b11b8674a147620f3350d (patch) | |
| tree | 16e33f8753460544501e6ff3cd48b1db188426f1 /core/src/ch/asynk/gdx/boardgame | |
| parent | a07149c93c1c1b5037c49cf6a6b6ec7c3aa02252 (diff) | |
| download | gdx-boardgame-909d7771fa7a5e65bc7b11b8674a147620f3350d.zip gdx-boardgame-909d7771fa7a5e65bc7b11b8674a147620f3350d.tar.gz | |
use pieces/Piece
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame')
| -rw-r--r-- | core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java b/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java index 3149e8d..cd99fb0 100644 --- a/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java +++ b/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java @@ -6,7 +6,7 @@ import com.badlogic.gdx.utils.Pool;  import com.badlogic.gdx.graphics.g2d.Batch;  import com.badlogic.gdx.graphics.glutils.ShapeRenderer; -import ch.asynk.gdx.boardgame.Scalable; +import ch.asynk.gdx.boardgame.pieces.Piece;  public class BounceAnimation extends TimedAnimation  { @@ -18,27 +18,27 @@ public class BounceAnimation extends TimedAnimation          }      }; -    public static BounceAnimation get(Scalable scalable, float duration, float bounceFactor) +    public static BounceAnimation get(Piece piece, float duration, float bounceFactor)      {          BounceAnimation a = bounceAnimationPool.obtain(); -        a.scalable = scalable; +        a.piece = piece;          a.duration = duration;          a.bounceFactor = bounceFactor;          return a;      } -    private Scalable scalable; +    private Piece piece;      private float bounceFactor;      private BounceAnimation()      {      } -    public BounceAnimation(Scalable scalable, float duration, float bounceFactor) +    public BounceAnimation(Piece piece, float duration, float bounceFactor)      { -        this.scalable = scalable; +        this.piece = piece;          this.duration = duration;          this.bounceFactor = bounceFactor;      } @@ -54,17 +54,17 @@ public class BounceAnimation extends TimedAnimation      @Override protected void end()      { -        scalable.setScale(1f); +        piece.setScale(1f);      }      @Override protected void update(float percent)      { -        scalable.setScale(1 + bounceFactor * (float) Math.sin(percent * Math.PI)); +        piece.setScale(1 + bounceFactor * (float) Math.sin(percent * Math.PI));      }      @Override public void draw(Batch batch)      { -        scalable.draw(batch); +        piece.draw(batch);      }      @Override public void drawDebug(ShapeRenderer debugShapes) | 
