formatting

This commit is contained in:
2026-04-19 14:41:10 -05:00
parent 9f790813bb
commit a803f5e759
31 changed files with 793 additions and 795 deletions

View File

@@ -1,23 +1,24 @@
import javax.swing.ImageIcon;
public class Powerup extends Collectable{
int yVelo, xVelo, id;
boolean onGround;
public Powerup(int x, int y, int w, int h, int id){
super(x,y,w,h,new ImageIcon("Sprites/Powerup" + id + ".png"));
xVelo = 0; yVelo = -7;
onGround = false;
this.id = id;
}
public void moveX(int moveX){
this.x += moveX;
this.rect.x = this.x;
}
public void moveY(int moveY){
this.y += moveY;
this.rect.y = this.y;
}
}
public class Powerup extends Collectable {
int yVelo, xVelo, id;
boolean onGround;
public Powerup(int x, int y, int w, int h, int id) {
super(x, y, w, h, new ImageIcon("Sprites/Powerup" + id + ".png"));
xVelo = 0;
yVelo = -7;
onGround = false;
this.id = id;
}
public void moveX(int moveX) {
this.x += moveX;
this.rect.x = this.x;
}
public void moveY(int moveY) {
this.y += moveY;
this.rect.y = this.y;
}
}