From 1c93589c77896f2c15f785869609d92c7c39ded9 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 16 Feb 2017 20:44:49 +0100 Subject: [PATCH] Increase drag speed (closes #3) --- .../src/io/github/lonamiwebs/klooni/game/PieceHolder.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java b/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java index d4b036b..7a57844 100644 --- a/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java +++ b/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java @@ -46,9 +46,7 @@ public class PieceHolder implements BinSerializable { //region Static members - public static final int NO_DROP = 0; - public static final int NORMAL_DROP = 1; - public static final int ON_BOARD_DROP = 2; + public static final float DRAG_SPEED = 0.5f; // Interpolation value ((pos -> new) / frame) //endregion @@ -230,8 +228,8 @@ public class PieceHolder implements BinSerializable { mouse.sub(piece.getRectangle().width * 0.5f, -pickedCellSize); } - piece.pos.lerp(mouse, 0.4f); - piece.cellSize = Interpolation.linear.apply(piece.cellSize, pickedCellSize, 0.4f); + piece.pos.lerp(mouse, DRAG_SPEED); + piece.cellSize = Interpolation.linear.apply(piece.cellSize, pickedCellSize, DRAG_SPEED); } // Return the pieces to their original position