add option for mirrorcollage
This commit is contained in:
parent
0d89c2612d
commit
7f908db6e7
|
@ -638,6 +638,20 @@ public class Options {
|
|||
}
|
||||
},
|
||||
|
||||
DANCE_MIRROR ("Mirror collage", "MirrorCollage", "Hypnotizing stuff", false) {
|
||||
@Override
|
||||
public void click(GameContainer container) {
|
||||
bool = !bool;
|
||||
Dancer.mirror = bool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(String s) {
|
||||
super.read(s);
|
||||
Dancer.mirror = bool;
|
||||
}
|
||||
},
|
||||
|
||||
PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) {
|
||||
// TODO
|
||||
},
|
||||
|
|
|
@ -601,11 +601,13 @@ public class Game extends BasicGameState {
|
|||
UI.draw(g, replayX, replayY, replayKeyPressed);
|
||||
else if (GameMod.AUTO.isActive()) {
|
||||
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, autoMousePressed);
|
||||
double dx = autoMousePosition.x - Options.width / 2d;
|
||||
double dy = autoMousePosition.y - Options.height / 2d;
|
||||
double d = Math.sqrt(dx * dx + dy * dy);
|
||||
double a = Math.atan2(dy, dx) + Math.PI;
|
||||
mirrorCursor.draw((int) (Math.cos(a) * d + Options.width / 2), (int) (Math.sin(a) * d + Options.height / 2), autoMousePressed);
|
||||
if (Dancer.mirror) {
|
||||
double dx = autoMousePosition.x - Options.width / 2d;
|
||||
double dy = autoMousePosition.y - Options.height / 2d;
|
||||
double d = Math.sqrt(dx * dx + dy * dy);
|
||||
double a = Math.atan2(dy, dx) + Math.PI;
|
||||
mirrorCursor.draw((int) (Math.cos(a) * d + Options.width / 2), (int) (Math.sin(a) * d + Options.height / 2), autoMousePressed);
|
||||
}
|
||||
}
|
||||
else if (GameMod.AUTOPILOT.isActive())
|
||||
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, Utils.isGameKeyPressed());
|
||||
|
@ -1397,10 +1399,12 @@ public class Game extends BasicGameState {
|
|||
// normal case
|
||||
if (!loseState) {
|
||||
gameObj.draw(g, trackPosition, false);
|
||||
g.pushTransform();
|
||||
g.rotate(Options.width / 2f, Options.height / 2f, 180f);
|
||||
gameObj.draw(g, trackPosition, true);
|
||||
g.popTransform();
|
||||
if (Dancer.mirror) {
|
||||
g.pushTransform();
|
||||
g.rotate(Options.width / 2f, Options.height / 2f, 180f);
|
||||
gameObj.draw(g, trackPosition, true);
|
||||
g.popTransform();
|
||||
}
|
||||
}
|
||||
// death: make objects "fall" off the screen
|
||||
else {
|
||||
|
|
|
@ -110,6 +110,7 @@ public class OptionsMenu extends BasicGameState {
|
|||
GameOption.DANCE_LAZY_SLIDERS,
|
||||
GameOption.DANCE_CIRCLE_STREAMS,
|
||||
GameOption.DANCE_ONLY_CIRCLE_STACKS,
|
||||
GameOption.DANCE_MIRROR,
|
||||
}),
|
||||
PIPPI ("Pippi", new GameOption[] {
|
||||
GameOption.PIPPI_ENABLE,
|
||||
|
|
|
@ -50,6 +50,8 @@ public class Dancer {
|
|||
|
||||
public static Dancer instance = new Dancer();
|
||||
|
||||
public static boolean mirror; // this should really get its own place somewhere...
|
||||
|
||||
private int dir;
|
||||
private GameObject p;
|
||||
private Random rand;
|
||||
|
|
Loading…
Reference in New Issue
Block a user