h
This commit is contained in:
parent
48ff37eed2
commit
ce5a72c85b
@ -2,5 +2,6 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="src" path=""/>
|
<classpathentry kind="src" path=""/>
|
||||||
|
<classpathentry kind="lib" path="mysql-connector-java-5.1.47.jar"/>
|
||||||
<classpathentry kind="output" path=""/>
|
<classpathentry kind="output" path=""/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -12,6 +12,7 @@ import javax.swing.JPanel;
|
|||||||
|
|
||||||
import enemyAI.*;
|
import enemyAI.*;
|
||||||
import gui.*;
|
import gui.*;
|
||||||
|
import java.sql.*;
|
||||||
|
|
||||||
public class mainThread extends JFrame implements KeyListener, ActionListener, MouseMotionListener, MouseListener, FocusListener{
|
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 static int mouseX, mouseY, centerScreenX, centerScreenY, currentMouseX, currentMouseY;
|
||||||
|
|
||||||
public mainThread(){
|
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");
|
setTitle("Battle Tank 3");
|
||||||
panel= (JPanel) this.getContentPane();
|
panel= (JPanel) this.getContentPane();
|
||||||
panel.setPreferredSize(new Dimension(768, 512));
|
panel.setPreferredSize(new Dimension(768, 512));
|
||||||
@ -226,6 +239,9 @@ public class mainThread extends JFrame implements KeyListener, ActionListener, M
|
|||||||
currentMouseX = MouseInfo.getPointerInfo().getLocation().x;
|
currentMouseX = MouseInfo.getPointerInfo().getLocation().x;
|
||||||
currentMouseY = MouseInfo.getPointerInfo().getLocation().y;
|
currentMouseY = MouseInfo.getPointerInfo().getLocation().y;
|
||||||
|
|
||||||
|
centerScreenX = getLocationOnScreen().x + 384;
|
||||||
|
centerScreenY = getLocationOnScreen().y + 256;
|
||||||
|
|
||||||
int deltaX = currentMouseX - centerScreenX;
|
int deltaX = currentMouseX - centerScreenX;
|
||||||
int deltaY = currentMouseY - centerScreenY;
|
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