-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBullet.java
42 lines (32 loc) · 1.05 KB
/
Bullet.java
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
import java.awt.Color;
public class Bullet extends Sprite
{
private int bulletX;
private int bulletY;
private Color[][] colorGrid;
public static final Color [][] BULLET_SHAPE =
{
{null,null,null,null,null,null,null,null,null,null,null},
{null,null,null,null,null,null,null,null,null,null,null},
{null,null,null,null,null,Display.BLACK,null,null,null,null,null},
{null,null,null,null,null,Display.BLACK,null,null,null,null,null},
{null,null,null,null,null,Display.BLACK,null,null,null,null,null},
{null,null,null,null,null,Display.BLACK,null,null,null,null,null},
{null,null,null,null,null,null,null,null,null,null,null},
{null,null,null,null,null,null,null,null,null,null,null},
};
public Bullet(int x, int y){
bulletX=x;
bulletY=y;
colorGrid=BULLET_SHAPE;
}//Constructor
public int getX(){
return bulletX;
}//getX
public int getY(){
return bulletY;
}//getY
public Color[][] getColorGrid(){
return this.colorGrid;
}//getColorGrid
}//Bullet