parent
90d7c933ba
commit
5334cb5391
@ -0,0 +1,29 @@
|
||||
package com.example.tankbattle;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class Explode {
|
||||
public static int WIDTH = ResourceMgr.explodes[0].getWidth();
|
||||
public static int HEIGHT = ResourceMgr.explodes[0].getHeight();
|
||||
|
||||
private int x, y;
|
||||
|
||||
private boolean living = true;
|
||||
TankFrame tf = null;
|
||||
|
||||
private int step = 0;
|
||||
|
||||
public Explode(int x, int y, TankFrame tf) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.tf = tf;
|
||||
}
|
||||
|
||||
public void paint(Graphics g) {
|
||||
|
||||
g.drawImage(ResourceMgr.explodes[step++], x, y, null);
|
||||
|
||||
if (step >= ResourceMgr.explodes.length)
|
||||
step = 0;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue