adjust the animations on the first circle of the slider

This commit is contained in:
yugecin 2016-12-18 14:46:02 +01:00
parent 59ed2f9ee3
commit 3c6b20f4c8
2 changed files with 32 additions and 17 deletions

View File

@ -150,7 +150,8 @@ public class GameData {
HIT_SLIDER10 = 7, HIT_SLIDER10 = 7,
HIT_SLIDER30 = 8, HIT_SLIDER30 = 8,
HIT_MAX = 9, // not a hit result HIT_MAX = 9, // not a hit result
HIT_SLIDER_REPEAT = 10; // not a hit result HIT_SLIDER_REPEAT = 10, // not a hit result
HIT_ANIMATION_RESULT = 11; // not a hit result
/** Hit result-related images (indexed by HIT_* constants). */ /** Hit result-related images (indexed by HIT_* constants). */
private Image[] hitResults; private Image[] hitResults;
@ -1211,6 +1212,10 @@ public class GameData {
hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, 0f, 0f, color, HitObjectType.SLIDER_CURVE, curve, true, true)); hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, 0f, 0f, color, HitObjectType.SLIDER_CURVE, curve, true, true));
} }
public void sendAnimationResult(int time, float x, float y, Color color, boolean expand) {
hitResultList.add(new HitObjectResult(time, HIT_ANIMATION_RESULT, x, y, color, HitObjectType.CIRCLE, null, expand, true));
}
/** /**
* Handles a slider tick result. * Handles a slider tick result.
* @param time the tick start time * @param time the tick start time

View File

@ -210,10 +210,12 @@ public class Slider implements GameObject {
hitCircle.drawCentered(endCircPos.x, endCircPos.y, color); hitCircle.drawCentered(endCircPos.x, endCircPos.y, color);
hitCircleOverlay.drawCentered(endCircPos.x, endCircPos.y, Colors.WHITE_FADE); hitCircleOverlay.drawCentered(endCircPos.x, endCircPos.y, Colors.WHITE_FADE);
// start circle // draw start circle when not clicked yet
hitCircle.drawCentered(x, y, color); if (!sliderClickedInitial) {
if (!overlayAboveNumber) hitCircle.drawCentered(x, y, color);
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); if (!overlayAboveNumber)
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE);
}
color.a = alpha; color.a = alpha;
@ -231,17 +233,18 @@ public class Slider implements GameObject {
alpha = Math.min(alpha, hiddenAlpha); alpha = Math.min(alpha, hiddenAlpha);
} }
} }
if (sliderClickedInitial)
; // don't draw current combo number if already clicked
else
data.drawSymbolNumber(hitObject.getComboNumber(), x, y,
hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha);
if (overlayAboveNumber) { // draw combonumber and overlay if not initially clicked
oldWhiteFadeAlpha = Colors.WHITE_FADE.a; if (!sliderClickedInitial) {
Colors.WHITE_FADE.a = sliderAlpha; data.drawSymbolNumber(hitObject.getComboNumber(), x, y,
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha);
Colors.WHITE_FADE.a = oldWhiteFadeAlpha;
if (overlayAboveNumber) {
oldWhiteFadeAlpha = Colors.WHITE_FADE.a;
Colors.WHITE_FADE.a = sliderAlpha;
hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE);
Colors.WHITE_FADE.a = oldWhiteFadeAlpha;
}
} }
// repeats // repeats
@ -460,8 +463,11 @@ public class Slider implements GameObject {
if (timeDiff < hitResultOffset[GameData.HIT_50]) { if (timeDiff < hitResultOffset[GameData.HIT_50]) {
result = GameData.HIT_SLIDER30; result = GameData.HIT_SLIDER30;
ticksHit++; ticksHit++;
} else if (timeDiff < hitResultOffset[GameData.HIT_MISS]) data.sendAnimationResult(trackPosition, x, y, color, true);
} else if (timeDiff < hitResultOffset[GameData.HIT_MISS]) {
result = GameData.HIT_MISS; result = GameData.HIT_MISS;
data.sendAnimationResult(trackPosition, x, y, color, false);
}
//else not a hit //else not a hit
if (result > -1) { if (result > -1) {
@ -489,8 +495,11 @@ public class Slider implements GameObject {
if (isAutoMod) { // "auto" mod: catch any missed notes due to lag if (isAutoMod) { // "auto" mod: catch any missed notes due to lag
ticksHit++; ticksHit++;
data.sliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats); data.sliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats);
} else data.sendAnimationResult(time, x, y, color, true);
} else {
data.sliderTickResult(time, GameData.HIT_MISS, x, y, hitObject, currentRepeats); data.sliderTickResult(time, GameData.HIT_MISS, x, y, hitObject, currentRepeats);
data.sendAnimationResult(trackPosition, x, y, color, false);
}
} }
// "auto" mod: send a perfect hit result // "auto" mod: send a perfect hit result
@ -499,6 +508,7 @@ public class Slider implements GameObject {
ticksHit++; ticksHit++;
sliderClickedInitial = true; sliderClickedInitial = true;
data.sliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats); data.sliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats);
data.sendAnimationResult(time, x, y, color, true);
} }
} }