fade out reversearrows after ball passed them
This commit is contained in:
@@ -141,16 +141,17 @@ public class GameData {
|
|||||||
|
|
||||||
/** Hit result types. */
|
/** Hit result types. */
|
||||||
public static final int
|
public static final int
|
||||||
HIT_MISS = 0,
|
HIT_MISS = 0,
|
||||||
HIT_50 = 1,
|
HIT_50 = 1,
|
||||||
HIT_100 = 2,
|
HIT_100 = 2,
|
||||||
HIT_300 = 3,
|
HIT_300 = 3,
|
||||||
HIT_100K = 4, // 100-Katu
|
HIT_100K = 4, // 100-Katu
|
||||||
HIT_300K = 5, // 300-Katu
|
HIT_300K = 5, // 300-Katu
|
||||||
HIT_300G = 6, // Geki
|
HIT_300G = 6, // Geki
|
||||||
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 result-related images (indexed by HIT_* constants). */
|
/** Hit result-related images (indexed by HIT_* constants). */
|
||||||
private Image[] hitResults;
|
private Image[] hitResults;
|
||||||
@@ -901,8 +902,21 @@ public class GameData {
|
|||||||
float scale = (!hitResult.expand) ? 1f : 1f + (HITCIRCLE_ANIM_SCALE - 1f) * progress;
|
float scale = (!hitResult.expand) ? 1f : 1f + (HITCIRCLE_ANIM_SCALE - 1f) * progress;
|
||||||
float alpha = 1f - progress;
|
float alpha = 1f - progress;
|
||||||
|
|
||||||
|
if (hitResult.result == HIT_SLIDER_REPEAT) {
|
||||||
|
// repeats
|
||||||
|
Image scaledRepeat = GameImage.REVERSEARROW.getImage().getScaledCopy(scale);
|
||||||
|
scaledRepeat.setAlpha(alpha);
|
||||||
|
float ang;
|
||||||
|
if (hitResult.hitResultType == HitObjectType.SLIDER_FIRST) {
|
||||||
|
ang = hitResult.curve.getStartAngle();
|
||||||
|
} else {
|
||||||
|
ang = hitResult.curve.getEndAngle();
|
||||||
|
}
|
||||||
|
scaledRepeat.rotate(ang);
|
||||||
|
scaledRepeat.drawCentered(hitResult.x, hitResult.y, hitResult.color);
|
||||||
|
}
|
||||||
// "hidden" mod: circle and slider animations not drawn
|
// "hidden" mod: circle and slider animations not drawn
|
||||||
if (!GameMod.HIDDEN.isActive()) {
|
else if (!GameMod.HIDDEN.isActive()) {
|
||||||
// slider curve
|
// slider curve
|
||||||
if (hitResult.curve != null) {
|
if (hitResult.curve != null) {
|
||||||
float oldWhiteAlpha = Colors.WHITE_FADE.a;
|
float oldWhiteAlpha = Colors.WHITE_FADE.a;
|
||||||
@@ -1177,6 +1191,10 @@ public class GameData {
|
|||||||
health = 0f;
|
health = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendRepeatSliderResult(int time, float x, float y, Color color, Curve curve, HitObjectType type) {
|
||||||
|
hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, x, y, color, type, curve, true, true));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a slider tick result.
|
* Handles a slider tick result.
|
||||||
* @param time the tick start time
|
* @param time the tick start time
|
||||||
|
|||||||
@@ -538,6 +538,23 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user