Skip to content

Commit

Permalink
Little Changes
Browse files Browse the repository at this point in the history
- Despues sigo
  • Loading branch information
TvConIdeas committed Oct 29, 2024
1 parent 3c05dbe commit bc46c96
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/entities/Alien1.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package entities;

import main.Game;

import static utilz.Constants.EnemyConstants.*;

public class Alien1 extends Enemy{
Expand All @@ -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 <====================
Expand Down
1 change: 1 addition & 0 deletions src/entities/Bullet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <====================
Expand Down
2 changes: 1 addition & 1 deletion src/entities/BulletManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/entities/EnemyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void update(){

public void draw(Graphics g){
drawAlien1(g);

}

/** move() ==> Se encarga de mover la ubicacion de los aliens1. */
Expand Down
2 changes: 1 addition & 1 deletion src/entities/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit bc46c96

Please sign in to comment.