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) {
|
PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) {
|
||||||
// TODO
|
// TODO
|
||||||
},
|
},
|
||||||
|
|
|
@ -601,12 +601,14 @@ public class Game extends BasicGameState {
|
||||||
UI.draw(g, replayX, replayY, replayKeyPressed);
|
UI.draw(g, replayX, replayY, replayKeyPressed);
|
||||||
else if (GameMod.AUTO.isActive()) {
|
else if (GameMod.AUTO.isActive()) {
|
||||||
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, autoMousePressed);
|
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, autoMousePressed);
|
||||||
|
if (Dancer.mirror) {
|
||||||
double dx = autoMousePosition.x - Options.width / 2d;
|
double dx = autoMousePosition.x - Options.width / 2d;
|
||||||
double dy = autoMousePosition.y - Options.height / 2d;
|
double dy = autoMousePosition.y - Options.height / 2d;
|
||||||
double d = Math.sqrt(dx * dx + dy * dy);
|
double d = Math.sqrt(dx * dx + dy * dy);
|
||||||
double a = Math.atan2(dy, dx) + Math.PI;
|
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);
|
mirrorCursor.draw((int) (Math.cos(a) * d + Options.width / 2), (int) (Math.sin(a) * d + Options.height / 2), autoMousePressed);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (GameMod.AUTOPILOT.isActive())
|
else if (GameMod.AUTOPILOT.isActive())
|
||||||
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, Utils.isGameKeyPressed());
|
UI.draw(g, (int) autoMousePosition.x, (int) autoMousePosition.y, Utils.isGameKeyPressed());
|
||||||
else
|
else
|
||||||
|
@ -1397,11 +1399,13 @@ public class Game extends BasicGameState {
|
||||||
// normal case
|
// normal case
|
||||||
if (!loseState) {
|
if (!loseState) {
|
||||||
gameObj.draw(g, trackPosition, false);
|
gameObj.draw(g, trackPosition, false);
|
||||||
|
if (Dancer.mirror) {
|
||||||
g.pushTransform();
|
g.pushTransform();
|
||||||
g.rotate(Options.width / 2f, Options.height / 2f, 180f);
|
g.rotate(Options.width / 2f, Options.height / 2f, 180f);
|
||||||
gameObj.draw(g, trackPosition, true);
|
gameObj.draw(g, trackPosition, true);
|
||||||
g.popTransform();
|
g.popTransform();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// death: make objects "fall" off the screen
|
// death: make objects "fall" off the screen
|
||||||
else {
|
else {
|
||||||
// time the object began falling
|
// time the object began falling
|
||||||
|
|
|
@ -110,6 +110,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_MIRROR,
|
||||||
}),
|
}),
|
||||||
PIPPI ("Pippi", new GameOption[] {
|
PIPPI ("Pippi", new GameOption[] {
|
||||||
GameOption.PIPPI_ENABLE,
|
GameOption.PIPPI_ENABLE,
|
||||||
|
|
|
@ -50,6 +50,8 @@ public class Dancer {
|
||||||
|
|
||||||
public static Dancer instance = new Dancer();
|
public static Dancer instance = new Dancer();
|
||||||
|
|
||||||
|
public static boolean mirror; // this should really get its own place somewhere...
|
||||||
|
|
||||||
private int dir;
|
private int dir;
|
||||||
private GameObject p;
|
private GameObject p;
|
||||||
private Random rand;
|
private Random rand;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user