final/src/BombDirectionShow.java

25 lines
729 B
Java
Raw Normal View History

2022-06-12 01:02:41 +01:00
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.Serializable;
2022-06-12 01:02:41 +01:00
public class BombDirectionShow extends StickyBomb implements Serializable {
2022-06-12 01:02:41 +01:00
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)) {
g.drawRect(x - GameFrame.game.camera.x + Player.PLAYER_WIDTH / 2, y + Player.PLAYER_HEIGHT / 2, 2, 2);
2022-06-12 01:02:41 +01:00
}
loopCounter++;
}
}
}