Tuning GameLoop

This commit is contained in:
toksikk
2014-11-07 14:12:10 +01:00
parent 140d1a02e1
commit 47a678ef91
+6 -3
View File
@@ -57,20 +57,20 @@ public class GameLoopD extends JFrame implements Runnable {
outerPanel = new JPanel(); outerPanel = new JPanel();
outerPanel.setLayout(new BorderLayout()); outerPanel.setLayout(new BorderLayout());
outerPanel.setVisible(true); outerPanel.setFocusable(false);
statusPanel = new JPanel(); statusPanel = new JPanel();
statusPanel.setLayout(new GridLayout(1,4));
statusPanel.setPreferredSize(new Dimension(800,80)); statusPanel.setPreferredSize(new Dimension(800,80));
statusPanel.setFocusable(false);
gamePanel = new JPanel(); gamePanel = new JPanel();
gamePanel.setLayout(null); gamePanel.setLayout(null);
gamePanel.setPreferredSize(new Dimension(800,600)); gamePanel.setPreferredSize(new Dimension(800,600));
gamePanel.setVisible(true);
actionPanel = new JPanel(); actionPanel = new JPanel();
actionPanel.setLayout(new GridLayout(1,1)); actionPanel.setLayout(new GridLayout(1,1));
actionPanel.setPreferredSize(new Dimension(800,80)); actionPanel.setPreferredSize(new Dimension(800,80));
actionPanel.setFocusable(false);
outerPanel.add(statusPanel,BorderLayout.NORTH); outerPanel.add(statusPanel,BorderLayout.NORTH);
@@ -121,6 +121,9 @@ public class GameLoopD extends JFrame implements Runnable {
Point spawnPoint4 = SpawnAssistant.getPathLocationOnGrid(); Point spawnPoint4 = SpawnAssistant.getPathLocationOnGrid();
opponent03.spawnAt(spawnPoint4); opponent03.spawnAt(spawnPoint4);
actionPanel.setVisible(true);
outerPanel.setVisible(true);
statusPanel.setVisible(true);
gamePanel.setVisible(true); gamePanel.setVisible(true);
//GameInterface.getGamePanel().repaint(); //GameInterface.getGamePanel().repaint();