[java]代码库
package cn.bjsxt.plane;
import java.awt.Graphics;
import java.awt.Image;
import cn.bjsxt.util.GameUtil;
/*
* 爆炸类
*/
public class Explode {
double x,y;
static Image[] imgs = new Image[16];
static {
for(int i=0;i<16;i++){
imgs[i] = GameUtil.getImage("images/explode/e"+(i+1)+".gif");
imgs[i].getWidth(null);
}
}
int count;
public void draw(Graphics g){
if(count<=15){
g.drawImage(imgs[count], (int)x, (int)y, null);
count++;
}
}
public Explode(double x,double y){
this.x = x;
this.y = y;
}
}
[源代码打包下载]
初级程序员
by: Jwoaioskdk 发表于:2017-07-22 13:54:32 顶(1) | 踩(0) 回复
??
回复评论