daily pastebin goal
75%
SHARE
TWEET

RTST GameCanvas

RandomGuy32 May 20th, 2016 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package randomguy32.realtimestrategything.render;
  2.  
  3. import randomguy32.realtimestrategything.controls.Controls;
  4.  
  5. import javax.swing.*;
  6. import java.awt.*;
  7.  
  8. public class GameCanvas extends JPanel {
  9.     public GameCanvas() {
  10.         super();
  11.  
  12.         setDoubleBuffered(true);
  13.         cursor = this.getMousePosition();
  14.  
  15.         addMouseListener(prepareMouseInput());
  16.         addKeyListener(new Controls());
  17.         setFocusable(true);
  18.     }
  19.  
  20.     public Point cursor;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top