-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameObject.java~
More file actions
44 lines (33 loc) · 809 Bytes
/
Copy pathGameObject.java~
File metadata and controls
44 lines (33 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.util.*;
import javax.imageio.*;
import java.io.*;
@SuppressWarnings("unused")
public class GameObject implements Runnable{
public void paint(Graphics2D g) {
}
public void keyPressed(String key) {
}
public static BufferedImage getImage(String filename) {
try {
File fp = new File(filename);
BufferedImage img = ImageIO.read(fp);
return img;
} catch (Exception e) {
e.printStackTrace();
}
}
public void keyReleased(String key) {
}
public static void delay(int ms) {
try {
Thread.sleep(ms);
} catch (Exception e) { }
}
public void run() {
}
}