Corrections for 'hidden' mod

This commit is contained in:
MatteoS 2015-08-09 01:20:45 +02:00
parent d82b8188e8
commit a13ea9308d
3 changed files with 24 additions and 18 deletions

View File

@ -256,10 +256,10 @@ public class Slider implements GameObject {
if (sliderTime == 0)
return;
if(!GameMod.HIDDEN.isActive()){
float[] c = curve.pointAt(getT(trackPosition, false));
float[] c2 = curve.pointAt(getT(trackPosition, false) + 0.01f);
if(!GameMod.HIDDEN.isActive()){
float t = getT(trackPosition, false);
// float dis = hitObject.getPixelLength() * HitObject.getXMultiplier() * (t - (int) t);
// Image sliderBallFrame = sliderBallImages[(int) (dis / (diameter * Math.PI) * 30) % sliderBallImages.length];
@ -267,14 +267,14 @@ public class Slider implements GameObject {
float angle = (float) (Math.atan2(c2[1] - c[1], c2[0] - c[0]) * 180 / Math.PI);
sliderBallFrame.setRotation(angle);
sliderBallFrame.drawCentered(c[0], c[1]);
}
// follow circle
if (followCircleActive)
if (followCircleActive){
GameImage.SLIDER_FOLLOWCIRCLE.getImage().drawCentered(c[0], c[1]);
}
// "flashlight" mod: dim the screen
if (followCircleActive && GameMod.FLASHLIGHT.isActive()) {
if (GameMod.FLASHLIGHT.isActive()) {
float oldAlphaBlack = Utils.COLOR_BLACK_ALPHA.a;
Utils.COLOR_BLACK_ALPHA.a = 0.75f;
g.setColor(Utils.COLOR_BLACK_ALPHA);
@ -283,6 +283,9 @@ public class Slider implements GameObject {
}
}
}
Utils.COLOR_WHITE_FADE.a = oldAlpha;
}

View File

@ -211,9 +211,11 @@ public class Spinner implements GameObject {
// main spinner elements
float approachScale = 1 - Utils.clamp(((float) timeDiff / (hitObject.getTime() - hitObject.getEndTime())), 0f, 1f);
if(!GameMod.HIDDEN.isActive()){
GameImage.SPINNER_CIRCLE.getImage().setAlpha(alpha);
GameImage.SPINNER_CIRCLE.getImage().setRotation(drawRotation * 360f);
GameImage.SPINNER_CIRCLE.getImage().drawCentered(width / 2, height / 2);
}
Image approachCircleScaled = GameImage.SPINNER_APPROACHCIRCLE.getImage().getScaledCopy(approachScale);
approachCircleScaled.setAlpha(alpha);
approachCircleScaled.drawCentered(width / 2, height / 2);

View File

@ -118,6 +118,7 @@ public class Game extends BasicGameState {
private int approachTime;
/** Decay of elements in hidden mod, in milliseconds. */
//TODO: figure out actual formula for decay time
private int decayTime = 800;
/** Time offsets for obtaining each hit result (indexed by HIT_* constants). */