convert game
This commit is contained in:
@@ -334,7 +334,13 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||
}
|
||||
|
||||
public void switchStateNow(Class<? extends OpsuState> newState) {
|
||||
switchState(newState, EmptyTransitionState.class, 0, EmptyTransitionState.class, 0);
|
||||
switchState(newState, EmptyTransitionState.class, 0, FadeInTransitionState.class, 300);
|
||||
}
|
||||
|
||||
public void switchStateInstantly(Class<? extends OpsuState> newState) {
|
||||
state.leave();
|
||||
state = instanceContainer.provide(newState);
|
||||
state.enter();
|
||||
}
|
||||
|
||||
public void switchState(Class<? extends OpsuState> newState, Class<? extends TransitionState> outTransition, int outTime, Class<? extends TransitionState> inTransition, int inTime) {
|
||||
|
||||
@@ -57,6 +57,8 @@ public class OpsuDanceInjector extends Injector {
|
||||
bind(ButtonMenu.class).asEagerSingleton();
|
||||
bind(SongMenu.class).asEagerSingleton();
|
||||
bind(DownloadsMenu.class).asEagerSingleton();
|
||||
bind(GameRanking.class).asEagerSingleton();
|
||||
bind(Game.class).asEagerSingleton();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,8 +26,13 @@ public abstract class OverlayOpsuState implements OpsuState {
|
||||
protected boolean active;
|
||||
protected boolean acceptInput;
|
||||
|
||||
public abstract void hide();
|
||||
public abstract void show();
|
||||
public void hide() {
|
||||
acceptInput = active = false;
|
||||
}
|
||||
|
||||
public void show() {
|
||||
acceptInput = active = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void update() {
|
||||
|
||||
Reference in New Issue
Block a user