Objects stop on song end.
Added time and song name. Changed WHITE to ORANGE.
This commit is contained in:
@@ -25,6 +25,7 @@ import audio.SongInstance;
|
||||
import audio.sorting.SortALPHA;
|
||||
import audio.sorting.SortPLAYED;
|
||||
import control.GameStateManager;
|
||||
import control.GameStateManager.State;
|
||||
import control.button.ButtonEvent;
|
||||
import control.button.ButtonHandler;
|
||||
import control.joystick.Joystick;
|
||||
@@ -150,6 +151,11 @@ public class MenuState extends GameState {
|
||||
selected = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(e.getButton().getButtonID() == 0)
|
||||
{
|
||||
gsm.setState(State.TITLE_STATE);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void buttonReleased(ButtonEvent e) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class PlayState extends GameState {
|
||||
|
||||
public PlayState(GameStateManager gsm, SongHandler sh) {
|
||||
super(gsm, sh);
|
||||
infoPanel = new InfoPanel(0, 0);
|
||||
infoPanel = new InfoPanel(0, 0, sh);
|
||||
area = new PlayArea(256, 1024, 1024, 125);
|
||||
player = new Player(1280 - 1024 + 1024 / 2, 1024 / 2);
|
||||
stroke = new BasicStroke(sizeOfEnemy, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
|
||||
@@ -89,6 +89,9 @@ public class PlayState extends GameState {
|
||||
Path p = area.paths.get(ob.getDirection());
|
||||
p.addEnemy(ob.getColor(), ob.getDirection(), (int) ob.getLength());
|
||||
}
|
||||
|
||||
if(progress > sh.getCurrentSongInstance().getEndTime() + Enemy.secondsToEnd*1000*2)
|
||||
gsm.setState(State.GAMEOVER_STATE);
|
||||
|
||||
oldProgress = progress;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user