Possibly fix bug
parent
80e5b90603
commit
e194a2f290
|
@ -165,6 +165,8 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
|||
try {
|
||||
GameFrame.main.remove(GameFrame.game);
|
||||
GameFrame.game.isRunning = false;
|
||||
GameFrame.game.player.xVelocity = 0;
|
||||
GameFrame.game.player.yVelocity = 0;
|
||||
GameFrame.game = new GamePanel(GameFrame.main); //run GamePanel constructor
|
||||
GameFrame.game.startThread();
|
||||
GameFrame.main.add(GameFrame.game, "game", 0);
|
||||
|
|
Loading…
Reference in New Issue