mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Fix 10X Speed up
This commit is contained in:
@@ -113,6 +113,9 @@ public class FCardPanel extends FDisplayObject {
|
|||||||
if (!animate || MatchController.instance.isGameFast() || MatchController.instance.getGameView().isMatchOver()) {
|
if (!animate || MatchController.instance.isGameFast() || MatchController.instance.getGameView().isMatchOver()) {
|
||||||
//don't animate if game is fast or match is over
|
//don't animate if game is fast or match is over
|
||||||
rotateTransform(g, x, y, w, h, edgeOffset, false);
|
rotateTransform(g, x, y, w, h, edgeOffset, false);
|
||||||
|
card.updateNeedsTapAnimation(false);
|
||||||
|
card.updateNeedsUntapAnimation(false);
|
||||||
|
card.updateNeedsTransformAnimation(false);
|
||||||
} else {
|
} else {
|
||||||
//card destroy animation
|
//card destroy animation
|
||||||
if (card.wasDestroyed()) {
|
if (card.wasDestroyed()) {
|
||||||
@@ -197,7 +200,7 @@ public class FCardPanel extends FDisplayObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private class CardTransformAnimation extends ForgeAnimation {
|
private class CardTransformAnimation extends ForgeAnimation {
|
||||||
private static final float DURATION = 0.14f;
|
private static final float DURATION = 0.18f;
|
||||||
private float progress = 0;
|
private float progress = 0;
|
||||||
|
|
||||||
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h) {
|
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h) {
|
||||||
@@ -236,7 +239,7 @@ public class FCardPanel extends FDisplayObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private class CardUnTapAnimation extends ForgeAnimation {
|
private class CardUnTapAnimation extends ForgeAnimation {
|
||||||
private static final float DURATION = 0.14f;
|
private static final float DURATION = 0.18f;
|
||||||
private float progress = 0;
|
private float progress = 0;
|
||||||
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h, float edgeOffset) {
|
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h, float edgeOffset) {
|
||||||
float percentage = progress / DURATION;
|
float percentage = progress / DURATION;
|
||||||
@@ -262,7 +265,7 @@ public class FCardPanel extends FDisplayObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private class CardTapAnimation extends ForgeAnimation {
|
private class CardTapAnimation extends ForgeAnimation {
|
||||||
private static final float DURATION = 0.14f;
|
private static final float DURATION = 0.18f;
|
||||||
private float progress = 0;
|
private float progress = 0;
|
||||||
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h, float edgeOffset, float angle) {
|
private void drawCard(Graphics g, CardView card, float x, float y, float w, float h, float edgeOffset, float angle) {
|
||||||
float percentage = progress / DURATION;
|
float percentage = progress / DURATION;
|
||||||
|
|||||||
Reference in New Issue
Block a user