Implement circleslowsliders
This commit is contained in:
parent
54fa335492
commit
9d6c413eb7
|
@ -115,6 +115,8 @@ public class Slider extends GameObject {
|
||||||
|
|
||||||
public static double bpm;
|
public static double bpm;
|
||||||
|
|
||||||
|
public float pixelLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the Slider data type with images and dimensions.
|
* Initializes the Slider data type with images and dimensions.
|
||||||
* @param container the game container
|
* @param container the game container
|
||||||
|
@ -164,6 +166,8 @@ public class Slider extends GameObject {
|
||||||
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
||||||
updatePosition();
|
updatePosition();
|
||||||
|
|
||||||
|
this.pixelLength = hitObject.getPixelLength();
|
||||||
|
|
||||||
// slider time calculations
|
// slider time calculations
|
||||||
this.sliderTime = hitObject.getSliderTime(sliderMultiplier, game.getBeatLength());
|
this.sliderTime = hitObject.getSliderTime(sliderMultiplier, game.getBeatLength());
|
||||||
this.sliderTimeTotal = sliderTime * hitObject.getRepeatCount();
|
this.sliderTimeTotal = sliderTime * hitObject.getRepeatCount();
|
||||||
|
|
|
@ -113,6 +113,7 @@ public class OptionsMenu extends BasicGameState {
|
||||||
GameOption.DANCE_LAZY_SLIDERS,
|
GameOption.DANCE_LAZY_SLIDERS,
|
||||||
GameOption.DANCE_CIRCLE_STREAMS,
|
GameOption.DANCE_CIRCLE_STREAMS,
|
||||||
GameOption.DANCE_ONLY_CIRCLE_STACKS,
|
GameOption.DANCE_ONLY_CIRCLE_STACKS,
|
||||||
|
GameOption.DANCE_CIRLCE_IN_SLOW_SLIDERS,
|
||||||
GameOption.DANCE_MIRROR,
|
GameOption.DANCE_MIRROR,
|
||||||
}),
|
}),
|
||||||
DANCEDISP ("Dance display", new GameOption[] {
|
DANCEDISP ("Dance display", new GameOption[] {
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class Dancer {
|
||||||
}
|
}
|
||||||
isCurrentLazySlider = false;
|
isCurrentLazySlider = false;
|
||||||
// detect lazy sliders, should work pretty good
|
// detect lazy sliders, should work pretty good
|
||||||
if (c.isSlider() && LAZY_SLIDERS && Utils.distance(c.start.x, c.start.y, c.end.x , c.end.y) <= Circle.diameter * 0.8f) {
|
if (c.isSlider() && LAZY_SLIDERS && Utils.distance(c.start.x, c.start.y, c.end.x, c.end.y) <= Circle.diameter * 0.8f) {
|
||||||
Slider s = (Slider) c;
|
Slider s = (Slider) c;
|
||||||
Vec2f mid = s.getCurve().pointAt(1f);
|
Vec2f mid = s.getCurve().pointAt(1f);
|
||||||
if (s.getRepeats() == 1 || Utils.distance(c.start.x, c.start.y, mid.x, mid.y) <= Circle.diameter * 0.8f) {
|
if (s.getRepeats() == 1 || Utils.distance(c.start.x, c.start.y, mid.x, mid.y) <= Circle.diameter * 0.8f) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ package yugecin.opsudance;
|
||||||
|
|
||||||
import itdelatrisu.opsu.objects.Circle;
|
import itdelatrisu.opsu.objects.Circle;
|
||||||
import itdelatrisu.opsu.objects.GameObject;
|
import itdelatrisu.opsu.objects.GameObject;
|
||||||
|
import itdelatrisu.opsu.objects.Slider;
|
||||||
|
|
||||||
public class Pippi {
|
public class Pippi {
|
||||||
|
|
||||||
|
@ -46,20 +47,23 @@ public class Pippi {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dance(int time, GameObject c, boolean isCurrentLazySlider) {
|
public static void dance(int time, GameObject c, boolean isCurrentLazySlider) {
|
||||||
if (!enabled || c.isSpinner()) {
|
boolean slowSlider = circleSlowSliders && c.isSlider() && (((((Slider) c).pixelLength < 200 || c.getEndTime() - c.getTime() > 400)) || isCurrentLazySlider);
|
||||||
|
if ((!enabled || c.isSpinner()) && !slowSlider) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (currentdelta >= targetdelta && c != previous) {
|
if (currentdelta >= targetdelta && c != previous) {
|
||||||
currentdelta = 0;
|
currentdelta = 0;
|
||||||
if (c.isSlider() && c.getTime() < time) {
|
if (c.isSlider() && c.getTime() < time) {
|
||||||
angle += angleSliderInc / 1800d * Math.PI;
|
angle += angleSliderInc / 1800d * Math.PI;
|
||||||
if (followcircleExpand && !isCurrentLazySlider) {
|
if (!slowSlider) {
|
||||||
|
if (followcircleExpand) {
|
||||||
if (c.getEndTime() - time < 40 && pippirad > pippimaxrad) {
|
if (c.getEndTime() - time < 40 && pippirad > pippimaxrad) {
|
||||||
pippirad -= 5d;
|
pippirad -= 5d;
|
||||||
} else if (time - c.getTime() > 10 && c.getEndTime() - c.getTime() > 600 && pippirad < pippimaxrad){
|
} else if (time - c.getTime() > 10 && c.getEndTime() - c.getTime() > 600 && pippirad < pippimaxrad) {
|
||||||
pippirad += 3d;
|
pippirad += 3d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (!c.isSpinner()) {
|
} else if (!c.isSpinner()) {
|
||||||
if (followcircleExpand && pippirad != pippiminrad) {
|
if (followcircleExpand && pippirad != pippiminrad) {
|
||||||
pippirad = pippiminrad;
|
pippirad = pippiminrad;
|
||||||
|
@ -74,6 +78,9 @@ public class Pippi {
|
||||||
}
|
}
|
||||||
Dancer.instance.x += pippirad * Math.cos(angle);
|
Dancer.instance.x += pippirad * Math.cos(angle);
|
||||||
Dancer.instance.y += pippirad * Math.sin(angle);
|
Dancer.instance.y += pippirad * Math.sin(angle);
|
||||||
|
if (slowSlider) {
|
||||||
|
c.end.set(Dancer.instance.x,Dancer.instance.y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void update(int delta) {
|
public static void update(int delta) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user