fix code order to fade in reversearrows

This commit is contained in:
yugecin 2016-12-10 11:07:47 +01:00
parent 8f059ca40b
commit 22a6cfd851
2 changed files with 2 additions and 9 deletions

View File

@ -119,8 +119,6 @@ public class Slider extends GameObject {
private static Color curveColor = new Color(0, 0, 0, 20); private static Color curveColor = new Color(0, 0, 0, 20);
public static double bpm;
public float pixelLength; public float pixelLength;
private int comboColorIndex; private int comboColorIndex;
@ -285,8 +283,7 @@ public class Slider extends GameObject {
for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) {
if (hitObject.getRepeatCount() - 1 > tcurRepeat) { if (hitObject.getRepeatCount() - 1 > tcurRepeat) {
Image arrow = GameImage.REVERSEARROW.getImage(); Image arrow = GameImage.REVERSEARROW.getImage();
//float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292));
//Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black;
Color arrowColor = Color.white; Color arrowColor = Color.white;
if (tcurRepeat != currentRepeats) { if (tcurRepeat != currentRepeats) {
if (sliderTime == 0) if (sliderTime == 0)
@ -295,13 +292,11 @@ public class Slider extends GameObject {
arrow.setAlpha((float) (t - Math.floor(t))); arrow.setAlpha((float) (t - Math.floor(t)));
} else } else
arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f);
//arrow = arrow.getScaledCopy((float) (1 + 0.3d * (trackPosition % bpm) / bpm));
arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292));
if (tcurRepeat % 2 == 0) { if (tcurRepeat % 2 == 0) {
// last circle // last circle
arrow.setRotation(curve.getEndAngle()); arrow.setRotation(curve.getEndAngle());
arrow.drawCentered(endPos.x, endPos.y, arrowColor); arrow.drawCentered(endPos.x, endPos.y, arrowColor);
} else if (sliderClickedInitial) { } else {
// first circle // first circle
arrow.setRotation(curve.getStartAngle()); arrow.setRotation(curve.getStartAngle());
arrow.drawCentered(x, y, arrowColor); arrow.drawCentered(x, y, arrowColor);

View File

@ -1348,8 +1348,6 @@ public class Game extends BasicGameState {
Dancer.instance.reset(); Dancer.instance.reset();
MoverDirection.reset(beatmap.beatmapID); MoverDirection.reset(beatmap.beatmapID);
Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier();
ObjectColorOverrides.reset(beatmap.beatmapID); ObjectColorOverrides.reset(beatmap.beatmapID);
CursorColorOverrides.reset(beatmap.beatmapID); CursorColorOverrides.reset(beatmap.beatmapID);