formatting
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import javax.swing.ImageIcon;
|
||||
import java.util.*;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
public class PowerBrick extends Tile{
|
||||
int id;
|
||||
boolean hit;
|
||||
|
||||
public PowerBrick(int x, int y, int w, int h, int id) {
|
||||
super(x, y, w, h, new ImageIcon("Sprites/Bricks/PowerBrick.png"));
|
||||
this.id = id;
|
||||
hit = false;
|
||||
}
|
||||
|
||||
public void spawnPower(ArrayList<Collectable> powerups){
|
||||
this.icon = new ImageIcon("Sprites/Bricks/EmptyBrick.png");
|
||||
hit = true;
|
||||
powerups.add(new Powerup(this.x, this.y - this.height, this.width, this.height, 1));
|
||||
}
|
||||
|
||||
public void reset(){
|
||||
hit = false;
|
||||
this.icon = new ImageIcon("Sprites/Bricks/PowerBrick.png");
|
||||
}
|
||||
}
|
||||
public class PowerBrick extends Tile {
|
||||
int id;
|
||||
boolean hit;
|
||||
|
||||
public PowerBrick(int x, int y, int w, int h, int id) {
|
||||
super(x, y, w, h, new ImageIcon("Sprites/Bricks/PowerBrick.png"));
|
||||
this.id = id;
|
||||
hit = false;
|
||||
}
|
||||
|
||||
public void spawnPower(ArrayList<Collectable> powerups) {
|
||||
this.icon = new ImageIcon("Sprites/Bricks/EmptyBrick.png");
|
||||
hit = true;
|
||||
powerups.add(new Powerup(this.x, this.y - this.height, this.width, this.height, 1));
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
hit = false;
|
||||
this.icon = new ImageIcon("Sprites/Bricks/PowerBrick.png");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user