parent
d77b7b1ed2
commit
a9c714596a
Binary file not shown.
@ -0,0 +1,43 @@
|
||||
package com.demo.tank.course3;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class Explode {
|
||||
private int x, y;
|
||||
public static final int WIDTH = ResourceManager.explodes[0].getWidth();
|
||||
public static final int HEIGHT = ResourceManager.explodes[0].getHeight();
|
||||
private boolean living = true;
|
||||
private TankFrameV3 tf;
|
||||
|
||||
private int step = 0;
|
||||
|
||||
public Explode(int x, int y, TankFrameV3 tf) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.tf = tf;
|
||||
}
|
||||
|
||||
public void paint(Graphics g){
|
||||
g.drawImage(ResourceManager.explodes[step++], x, y, null);
|
||||
if(step >= ResourceManager.explodes.length){
|
||||
step = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.demo.tank.course3;
|
||||
|
||||
public enum Group {
|
||||
GOOD, BAD
|
||||
}
|
Loading…
Reference in new issue