diff --git a/src/entities/Alien1.java b/src/entities/Alien1.java index e486437..664d9b2 100644 --- a/src/entities/Alien1.java +++ b/src/entities/Alien1.java @@ -1,5 +1,7 @@ package entities; +import main.Game; + import static utilz.Constants.EnemyConstants.*; public class Alien1 extends Enemy{ @@ -10,6 +12,7 @@ public class Alien1 extends Enemy{ // ====================> CONTRUCTOR <==================== public Alien1(float x, float y) { super(x, y, Alien_WIDTH, Alien_HEIGHT, Alien1); + initHitbox(x, y, (int) (20 * Game.SCALE), (int) (28 * Game.SCALE)); } // ====================> GET | SET <==================== diff --git a/src/entities/Bullet.java b/src/entities/Bullet.java index 955bfc8..74705ba 100644 --- a/src/entities/Bullet.java +++ b/src/entities/Bullet.java @@ -12,6 +12,7 @@ public class Bullet extends Entity { public Bullet(float x, float y, int width, int height) { super(x, y, width, height); active = false; + initHitbox(x, y, width, height); } // ====================> GET | SET <==================== diff --git a/src/entities/BulletManager.java b/src/entities/BulletManager.java index 4b1fd62..04599e3 100644 --- a/src/entities/BulletManager.java +++ b/src/entities/BulletManager.java @@ -30,7 +30,7 @@ public void draw(Graphics g){ for (int i = 0; i < bulletArr.size(); i++) { Bullet bullet = bulletArr.get(i); if (!bullet.active) { - g.drawRect((int)bullet.x, (int)bullet.y, bullet.width, bullet.height); + g.fillRect((int)bullet.x, (int)bullet.y, bullet.width, bullet.height); } } } diff --git a/src/entities/EnemyManager.java b/src/entities/EnemyManager.java index e2b7479..c048367 100644 --- a/src/entities/EnemyManager.java +++ b/src/entities/EnemyManager.java @@ -45,6 +45,7 @@ public void update(){ public void draw(Graphics g){ drawAlien1(g); + } /** move() ==> Se encarga de mover la ubicacion de los aliens1. */ diff --git a/src/entities/Player.java b/src/entities/Player.java index 5b4e9a5..2e6bf29 100644 --- a/src/entities/Player.java +++ b/src/entities/Player.java @@ -63,7 +63,7 @@ public void update(){ public void draw(Graphics g){ g.drawImage(animations[state][aniIndex], (int)(hitbox.x - xDrawOffset), (int)(hitbox.y - yDrawOffset), width,height,null); -// drawHitbox(g); // COMENTAR DESPUES !!!!!!!!!!!!!!! + drawHitbox(g); // COMENTAR DESPUES !!!!!!!!!!!!!!! } /** updateAnimationTick() ==> Genera el efecto de animaciĆ³n, utilizando los sprite. */