}
//在缓冲区重画
this.layerManager.paint(g, 0, (getHeight() - WORLD_HEIGHT) / 2);
this.flushGraphics();
}
public void commandAction(Command command, Displayable display) {
if(command == startCommand){
if(this.gameState == GAME_OVER){
gameState = GAME_INIT;
}else{
gameState = GAME_RUN;
}
this.removeCommand(this.startCommand);
this.addCommand(pauseCommand);
}else if(command == pauseCommand){
gameState = GAME_PAUSE;
this.removeCommand(this.pauseCommand);
this.addCommand(startCommand);
}else if(command == exitCommand){
gameState = GAME_OVER;
}