⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 explode.java

📁 坦克大战的代码 自己写的 部分内容没有完成
💻 JAVA
字号:
import java.awt.*;


public class Explode {
	int x, y;
	TankClient tk;
	boolean live = true;
	int[] oval = {5, 8, 12, 15, 18, 20, 23, 26, 30, 25, 20, 15, 10, 5};
	int step = 0;
	
	public Explode(int x, int y, TankClient tk) {
		this.x = x;
		this.y = y;
		this.tk = tk;
	}
	
	public void draw(Graphics g) {
		if(!live) return;
		if(step == oval.length) {
			live = false;
			return;
		}
		
		Color c = g.getColor();
		g.setColor(Color.orange);
		g.fillOval(x, y, oval[step], oval[step]);
		step++;
		g.setColor(c);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -