From f7d6fed0c6b9c1fc495052d7154180fa9fed1611 Mon Sep 17 00:00:00 2001 From: Drew Lemmy Date: Tue, 7 Apr 2015 19:23:54 +0100 Subject: [PATCH] Final fixes #71 --- src/itdelatrisu/opsu/GameData.java | 1 - src/itdelatrisu/opsu/Utils.java | 18 +++++++++++++++++- .../opsu/objects/HitResultType.java | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index a0ae4df7..210b7188 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -1244,7 +1244,6 @@ public class GameData { case HIT_MISS: hitValue = 0; changeHealth(-10f); - changeHealth(-10f); comboEnd |= 2; resetComboStreak(); break; diff --git a/src/itdelatrisu/opsu/Utils.java b/src/itdelatrisu/opsu/Utils.java index 65678e55..db200ee4 100644 --- a/src/itdelatrisu/opsu/Utils.java +++ b/src/itdelatrisu/opsu/Utils.java @@ -608,10 +608,26 @@ public class Utils { return String.format("%02d:%02d:%02d", seconds / 3600, (seconds / 60) % 60, seconds % 60); } + /** + * Cubic ease out function + * @param t the current time + * @param a the starting position + * @param b the finishing position + * @param d the duration + * @return the eased float + */ public static float easeOut(float t, float a, float b, float d) { return b * ((t = t / d - 1f) * t * t + 1f) + a; } - + + /** + * Fake bounce ease function + * @param t the current time + * @param a the starting position + * @param b the finishing position + * @param d the duration + * @return the eased float + */ public static float easeBounce(float t, float a, float b, float d) { if (t < d / 2) return easeOut(t, a, b, d); diff --git a/src/itdelatrisu/opsu/objects/HitResultType.java b/src/itdelatrisu/opsu/objects/HitResultType.java index 3dea7458..0f7f4311 100644 --- a/src/itdelatrisu/opsu/objects/HitResultType.java +++ b/src/itdelatrisu/opsu/objects/HitResultType.java @@ -2,7 +2,7 @@ package itdelatrisu.opsu.objects; public enum HitResultType { CIRCLE, - SLIDERSTART, + //SLIDERSTART, SLIDERTICK, SLIDEREND, SLIDEREND_FIRSTOBJECT,