[FEATURE] Player now blinks when invulnerable after collision.
This commit is contained in:
parent
25a27282f5
commit
af4c22c0fd
|
@ -121,12 +121,11 @@ public class Player extends ShootingEntity implements KeyboardListener {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void paint(Graphics2D g) {
|
public void paint(Graphics2D g) {
|
||||||
// Todo: add blink effect
|
|
||||||
if(this.currentCollisionCooldown > 0) {
|
if(this.currentCollisionCooldown > 0) {
|
||||||
//g.setColor(Color.RED);
|
if(this.currentCollisionCooldown % 3 == 0) super.paint(g);
|
||||||
//g.drawRect(this.getX(), this.getY(), this.getImageWidth(), this.getImageHeight());
|
} else {
|
||||||
|
super.paint(g);
|
||||||
}
|
}
|
||||||
super.paint(g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue