don't show reversearrow pop when slider wasn't held

This commit is contained in:
yugecin 2016-12-18 15:06:21 +01:00
parent 55fa6f4070
commit 2260299c4b

View File

@ -562,23 +562,6 @@ public class Slider implements GameObject {
tickIndex = 0; tickIndex = 0;
isNewRepeat = true; isNewRepeat = true;
tickExpandTime = TICK_EXPAND_TIME; tickExpandTime = TICK_EXPAND_TIME;
// send hit result, to fade out reversearrow
HitObjectType type;
float posX, posY;
if (currentRepeats % 2 == 1) {
type = HitObjectType.SLIDER_LAST;
Vec2f endPos = curve.pointAt(1);
posX = endPos.x;
posY = endPos.y;
} else {
type = HitObjectType.SLIDER_FIRST;
posX = this.x;
posY = this.y;
}
float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b;
Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black;
data.sendRepeatSliderResult(trackPosition, posX, posY, arrowColor, curve, type);
} }
} }
@ -606,13 +589,26 @@ public class Slider implements GameObject {
// held during new repeat // held during new repeat
if (isNewRepeat) { if (isNewRepeat) {
ticksHit++; ticksHit++;
HitObjectType type;
float posX, posY;
if (currentRepeats % 2 > 0) { // last circle if (currentRepeats % 2 > 0) { // last circle
int lastIndex = hitObject.getSliderX().length; type = HitObjectType.SLIDER_LAST;
data.sliderTickResult(trackPosition, GameData.HIT_SLIDER30, Vec2f endPos = curve.pointAt(1f);
curve.getX(lastIndex), curve.getY(lastIndex), hitObject, currentRepeats); posX = endPos.x;
} else // first circle posY = endPos.y;
data.sliderTickResult(trackPosition, GameData.HIT_SLIDER30, } else { // first circle
c.x, c.y, hitObject, currentRepeats); type = HitObjectType.SLIDER_FIRST;
posX = this.x;
posY = this.y;
}
data.sliderTickResult(trackPosition, GameData.HIT_SLIDER30,
posX, posY, hitObject, currentRepeats);
// send hit result, to fade out reversearrow
float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b;
Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black;
data.sendRepeatSliderResult(trackPosition, posX, posY, arrowColor, curve, type);
} }
// held during new tick // held during new tick