Corrections for 'hidden' mod
This commit is contained in:
parent
d82b8188e8
commit
a13ea9308d
|
@ -255,11 +255,11 @@ public class Slider implements GameObject {
|
||||||
// slider time may not have been calculated, which causes NAN numbers and flicker.
|
// slider time may not have been calculated, which causes NAN numbers and flicker.
|
||||||
if (sliderTime == 0)
|
if (sliderTime == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
float[] c = curve.pointAt(getT(trackPosition, false));
|
||||||
|
float[] c2 = curve.pointAt(getT(trackPosition, false) + 0.01f);
|
||||||
|
|
||||||
if(!GameMod.HIDDEN.isActive()){
|
if(!GameMod.HIDDEN.isActive()){
|
||||||
float[] c = curve.pointAt(getT(trackPosition, false));
|
|
||||||
float[] c2 = curve.pointAt(getT(trackPosition, false) + 0.01f);
|
|
||||||
|
|
||||||
float t = getT(trackPosition, false);
|
float t = getT(trackPosition, false);
|
||||||
// float dis = hitObject.getPixelLength() * HitObject.getXMultiplier() * (t - (int) t);
|
// float dis = hitObject.getPixelLength() * HitObject.getXMultiplier() * (t - (int) t);
|
||||||
// Image sliderBallFrame = sliderBallImages[(int) (dis / (diameter * Math.PI) * 30) % sliderBallImages.length];
|
// Image sliderBallFrame = sliderBallImages[(int) (dis / (diameter * Math.PI) * 30) % sliderBallImages.length];
|
||||||
|
@ -267,20 +267,23 @@ public class Slider implements GameObject {
|
||||||
float angle = (float) (Math.atan2(c2[1] - c[1], c2[0] - c[0]) * 180 / Math.PI);
|
float angle = (float) (Math.atan2(c2[1] - c[1], c2[0] - c[0]) * 180 / Math.PI);
|
||||||
sliderBallFrame.setRotation(angle);
|
sliderBallFrame.setRotation(angle);
|
||||||
sliderBallFrame.drawCentered(c[0], c[1]);
|
sliderBallFrame.drawCentered(c[0], c[1]);
|
||||||
|
}
|
||||||
|
|
||||||
// follow circle
|
// follow circle
|
||||||
if (followCircleActive)
|
if (followCircleActive){
|
||||||
GameImage.SLIDER_FOLLOWCIRCLE.getImage().drawCentered(c[0], c[1]);
|
GameImage.SLIDER_FOLLOWCIRCLE.getImage().drawCentered(c[0], c[1]);
|
||||||
|
|
||||||
}
|
// "flashlight" mod: dim the screen
|
||||||
// "flashlight" mod: dim the screen
|
if (GameMod.FLASHLIGHT.isActive()) {
|
||||||
if (followCircleActive && GameMod.FLASHLIGHT.isActive()) {
|
float oldAlphaBlack = Utils.COLOR_BLACK_ALPHA.a;
|
||||||
float oldAlphaBlack = Utils.COLOR_BLACK_ALPHA.a;
|
Utils.COLOR_BLACK_ALPHA.a = 0.75f;
|
||||||
Utils.COLOR_BLACK_ALPHA.a = 0.75f;
|
g.setColor(Utils.COLOR_BLACK_ALPHA);
|
||||||
g.setColor(Utils.COLOR_BLACK_ALPHA);
|
g.fillRect(0, 0, containerWidth, containerHeight);
|
||||||
g.fillRect(0, 0, containerWidth, containerHeight);
|
Utils.COLOR_BLACK_ALPHA.a = oldAlphaBlack;
|
||||||
Utils.COLOR_BLACK_ALPHA.a = oldAlphaBlack;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.COLOR_WHITE_FADE.a = oldAlpha;
|
Utils.COLOR_WHITE_FADE.a = oldAlpha;
|
||||||
|
|
|
@ -211,9 +211,11 @@ public class Spinner implements GameObject {
|
||||||
|
|
||||||
// main spinner elements
|
// main spinner elements
|
||||||
float approachScale = 1 - Utils.clamp(((float) timeDiff / (hitObject.getTime() - hitObject.getEndTime())), 0f, 1f);
|
float approachScale = 1 - Utils.clamp(((float) timeDiff / (hitObject.getTime() - hitObject.getEndTime())), 0f, 1f);
|
||||||
GameImage.SPINNER_CIRCLE.getImage().setAlpha(alpha);
|
if(!GameMod.HIDDEN.isActive()){
|
||||||
GameImage.SPINNER_CIRCLE.getImage().setRotation(drawRotation * 360f);
|
GameImage.SPINNER_CIRCLE.getImage().setAlpha(alpha);
|
||||||
GameImage.SPINNER_CIRCLE.getImage().drawCentered(width / 2, height / 2);
|
GameImage.SPINNER_CIRCLE.getImage().setRotation(drawRotation * 360f);
|
||||||
|
GameImage.SPINNER_CIRCLE.getImage().drawCentered(width / 2, height / 2);
|
||||||
|
}
|
||||||
Image approachCircleScaled = GameImage.SPINNER_APPROACHCIRCLE.getImage().getScaledCopy(approachScale);
|
Image approachCircleScaled = GameImage.SPINNER_APPROACHCIRCLE.getImage().getScaledCopy(approachScale);
|
||||||
approachCircleScaled.setAlpha(alpha);
|
approachCircleScaled.setAlpha(alpha);
|
||||||
approachCircleScaled.drawCentered(width / 2, height / 2);
|
approachCircleScaled.drawCentered(width / 2, height / 2);
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class Game extends BasicGameState {
|
||||||
private int approachTime;
|
private int approachTime;
|
||||||
|
|
||||||
/** Decay of elements in hidden mod, in milliseconds. */
|
/** Decay of elements in hidden mod, in milliseconds. */
|
||||||
|
//TODO: figure out actual formula for decay time
|
||||||
private int decayTime = 800;
|
private int decayTime = 800;
|
||||||
|
|
||||||
/** Time offsets for obtaining each hit result (indexed by HIT_* constants). */
|
/** Time offsets for obtaining each hit result (indexed by HIT_* constants). */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user