|
|
@@ -3,6 +3,7 @@ package view;
|
|
|
import java.awt.Dimension;
|
|
|
import java.awt.Graphics;
|
|
|
import java.awt.Graphics2D;
|
|
|
+import java.awt.RenderingHints;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
|
|
|
|
@@ -27,7 +28,7 @@ public class GameView extends JPanel implements ActionListener{
|
|
|
{
|
|
|
this.led=led;
|
|
|
this.gsm = gsm;
|
|
|
- t = new Timer(1000/30, this);
|
|
|
+ t = new Timer(1000/60, this);
|
|
|
t.start();
|
|
|
setPreferredSize(new Dimension(1280,1024));
|
|
|
}
|
|
|
@@ -40,8 +41,12 @@ public class GameView extends JPanel implements ActionListener{
|
|
|
public void paintComponent(Graphics g)
|
|
|
{
|
|
|
super.paintComponent(g);
|
|
|
- Graphics2D g2d = (Graphics2D) g;
|
|
|
|
|
|
+ Graphics2D g2d = (Graphics2D) g;
|
|
|
+ RenderingHints rh = new RenderingHints(
|
|
|
+ RenderingHints.KEY_ANTIALIASING,
|
|
|
+ RenderingHints.VALUE_ANTIALIAS_ON);
|
|
|
+ g2d.setRenderingHints(rh);
|
|
|
gsm.currentState.draw(g2d);
|
|
|
}
|
|
|
}
|