📄 explode.java
字号:
package com.wuxiaohong.tank;
import java.awt.*;
public class Explode {
private int x,y;
private boolean live=true;
int diameter[] ={4,7,15,27,33,16,5,4,1};
TankClient tc;
int step = 0;
public Explode(int x,int y,TankClient tc)
{
this.x=x;
this.y=y;
this.tc = tc;
}
public void draw(Graphics g)
{
if(step==diameter.length)
{
this.live=false;
tc.explode.remove(this);
return;
}
Color c = g.getColor();
g.setColor(Color.ORANGE);
g.fillOval(x, y, diameter[step], diameter[step]);
g.setColor(c);
step++;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -