package cn.sxt.game;
import java.awt.Graphics;
import java.awt.Image;
/*
* 爆炸类
*/
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;
}
}
最近下载更多
最近浏览更多
3334004690 LV11
2024年6月22日
ClydeSon LV5
2023年12月27日
微信网友_6790966844739584 LV5
2023年12月27日
2871581741 LV1
2023年12月22日
bangyiyang LV2
2023年12月21日
412836806
2023年10月13日
暂无贡献等级
yangxb2 LV10
2023年7月11日
2017143155 LV12
2023年6月26日
啊伟大伟大
2023年6月18日
暂无贡献等级
微信网友_6508798513811456 LV5
2023年6月7日

