make reversearrows scale to the bpm

This commit is contained in:
yugecin 2016-10-01 13:12:02 +02:00
parent ea45767fa1
commit 70d006b645
2 changed files with 7 additions and 1 deletions

View File

@ -32,7 +32,6 @@ import itdelatrisu.opsu.states.Game;
import itdelatrisu.opsu.ui.Colors;
import itdelatrisu.opsu.ui.animations.AnimationEquation;
import org.lwjgl.opengl.GL11;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
@ -114,6 +113,8 @@ public class Slider extends GameObject {
private static Color curveColor = new Color(0, 0, 0, 20);
public static double bpm;
/**
* Initializes the Slider data type with images and dimensions.
* @param container the game container
@ -282,6 +283,9 @@ public class Slider extends GameObject {
arrow.setAlpha((float) (t - Math.floor(t)));
} else
arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f);
float sc = (float) (1 + 0.3d * (trackPosition % bpm) / bpm);
System.out.println(sc);
arrow = arrow.getScaledCopy(sc);
if (tcurRepeat % 2 == 0) {
// last circle
arrow.setRotation(curve.getEndAngle());

View File

@ -1313,6 +1313,8 @@ public class Game extends BasicGameState {
SoundController.mute(false);
}
Slider.bpm = beatmap.bpmMin * GameMod.getSpeedMultiplier();
skipButton.resetHover();
if (isReplay || GameMod.AUTO.isActive())
playbackSpeed.getButton().resetHover();