From af4c22c0fd8fa402ee4bf01428d6d39d91f751a1 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 30 Jan 2015 11:23:56 +0100 Subject: [PATCH] [FEATURE] Player now blinks when invulnerable after collision. --- src/de/teamteamteam/spacescooter/entity/Player.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/de/teamteamteam/spacescooter/entity/Player.java b/src/de/teamteamteam/spacescooter/entity/Player.java index f815efe..4f33569 100644 --- a/src/de/teamteamteam/spacescooter/entity/Player.java +++ b/src/de/teamteamteam/spacescooter/entity/Player.java @@ -121,12 +121,11 @@ public class Player extends ShootingEntity implements KeyboardListener { */ @Override public void paint(Graphics2D g) { - // Todo: add blink effect if(this.currentCollisionCooldown > 0) { - //g.setColor(Color.RED); - //g.drawRect(this.getX(), this.getY(), this.getImageWidth(), this.getImageHeight()); + if(this.currentCollisionCooldown % 3 == 0) super.paint(g); + } else { + super.paint(g); } - super.paint(g); } /**