📄 explode.java
字号:
package com.zhoutenghn;
import java.awt.*;
public class Explode {
private boolean live = true;
BeginPlay tc;
int x , y;
int[] exwide = {3,7,9,10,17,23,29,35,40,45,30,20,15,9,2};
private int step = 0;
public Explode(int x, int y,boolean live, BeginPlay tc ) {
this.live = live;
this.tc = tc;
this.x = x;
this.y = y;
}
public void draw(Graphics g){
if(!live){
tc.explodes.remove(this);
return;
}
if (step == exwide.length){
live = false;
step = 0;
return;
}
Color c = g.getColor();
g.setColor(Color.PINK);
g.fillOval(x, y, exwide[step], exwide[step]);
step++;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -