RandomGuy32

RTST GameCanvas

May 20th, 2016
130
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×