parent
4a687543fa
commit
afd0aaf2f4
@ -0,0 +1,41 @@
|
||||
package com.msb;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @Author bingor
|
||||
* @Date 2022-09-29 21:53
|
||||
* @Description: com.msb
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public class Explode {
|
||||
|
||||
private int x,y;
|
||||
private TankFrame tankFrame;
|
||||
public static final int WIDTH = ResourcesMgr.explodeImages[0].getWidth();
|
||||
public static final int HEIGHT = ResourcesMgr.explodeImages[0].getHeight();
|
||||
// private boolean live = true;
|
||||
private int step = 0;
|
||||
|
||||
public Explode(int x, int y, TankFrame tankFrame) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.tankFrame = tankFrame;
|
||||
}
|
||||
|
||||
public void paint(Graphics g) {
|
||||
|
||||
g.drawImage(ResourcesMgr.explodeImages[step++], x, y, null);
|
||||
if(step >= ResourcesMgr.explodeImages.length) step = 0;
|
||||
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue