final/src/BombDirectionShow.java

24 lines
670 B
Java
Raw Normal View History

2022-06-12 01:02:41 +01:00
import java.awt.*;
import java.awt.image.BufferedImage;
public class BombDirectionShow extends StickyBomb{
public BombDirectionShow(int x, int y, int xVelocity, int yVelocity) {
super(x, y, xVelocity, yVelocity, null, null);
2022-06-12 19:11:09 +01:00
WIDTH = 25;
HEIGHT = 25;
2022-06-12 01:02:41 +01:00
}
public void draw(Graphics g){
2022-06-12 04:48:57 +01:00
update();
2022-06-12 01:02:41 +01:00
isMove = true;
int loopCounter = 0;
while(isMove&&loopCounter<10) {
super.move();
2022-06-12 04:48:57 +01:00
if(isMove&&canUpdate(0,0)) {
2022-06-12 01:02:41 +01:00
g.drawRect(x - GamePanel.camera.x + Player.PLAYER_WIDTH / 2, y + Player.PLAYER_HEIGHT / 2, 2, 2);
}
loopCounter++;
}
}
}