Moves all game source files and assets into the 'American-Identity-Project' directory and updates the manifest to point to the 'Display' class as the main entry point. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f6819c21-e85d-45ac-acde-604db2cfa4fe Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: a9500e48-7f68-408f-a5c6-28df9f59fe00 Replit-Helium-Checkpoint-Created: true
25 lines
630 B
Java
25 lines
630 B
Java
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");
|
|
}
|
|
}
|