- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExplode.java
More file actions
Latest commit
27 lines (23 loc) · 599 Bytes
/
Copy pathExplode.java
File metadata and controls
27 lines (23 loc) · 599 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
importjava.awt.Graphics;
importjava.awt.Image;
publicclassExplode {
doublex,y;
staticImage[] imgs = newImage[16];
static {
for(inti=0;i<16;i++){
imgs[i] = GameUtil.getImage("images/explode/e"+(i+1)+".gif");
imgs[i].getWidth(null);
}
}
intcount;
publicvoiddraw(Graphicsg){
if(count<=15){
g.drawImage(imgs[count], (int)x, (int)y, null);
count++;
}
}
publicExplode(doublex,doubley){
this.x = x;
this.y = y;
}
}