h
This commit is contained in:
parent
48ff37eed2
commit
ce5a72c85b
@ -2,5 +2,6 @@
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry kind="lib" path="mysql-connector-java-5.1.47.jar"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
||||
|
@ -12,6 +12,7 @@ import javax.swing.JPanel;
|
||||
|
||||
import enemyAI.*;
|
||||
import gui.*;
|
||||
import java.sql.*;
|
||||
|
||||
public class mainThread extends JFrame implements KeyListener, ActionListener, MouseMotionListener, MouseListener, FocusListener{
|
||||
|
||||
@ -68,6 +69,18 @@ public class mainThread extends JFrame implements KeyListener, ActionListener, M
|
||||
public static int mouseX, mouseY, centerScreenX, centerScreenY, currentMouseX, currentMouseY;
|
||||
|
||||
public mainThread(){
|
||||
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
Connection connect = DriverManager.getConnection("jdbc:mysql://remotemysql.com/TDYAgrQ1Ny?useSSL=false", "TDYAgrQ1Ny", "SrexYcsOSv");
|
||||
|
||||
connect.close();
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
setTitle("Battle Tank 3");
|
||||
panel= (JPanel) this.getContentPane();
|
||||
panel.setPreferredSize(new Dimension(768, 512));
|
||||
@ -226,6 +239,9 @@ public class mainThread extends JFrame implements KeyListener, ActionListener, M
|
||||
currentMouseX = MouseInfo.getPointerInfo().getLocation().x;
|
||||
currentMouseY = MouseInfo.getPointerInfo().getLocation().y;
|
||||
|
||||
centerScreenX = getLocationOnScreen().x + 384;
|
||||
centerScreenY = getLocationOnScreen().y + 256;
|
||||
|
||||
int deltaX = currentMouseX - centerScreenX;
|
||||
int deltaY = currentMouseY - centerScreenY;
|
||||
|
||||
|
BIN
mysql-connector-java-5.1.47.jar
Normal file
BIN
mysql-connector-java-5.1.47.jar
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user