add BigRockNPC and IronDoorObj; update AssetSetter to include new NPC and interactive tiles

This commit is contained in:
2026-03-24 13:01:21 +01:00
parent 7bbbd8f72b
commit aadd01f8ec
18 changed files with 388 additions and 40 deletions

View File

@@ -0,0 +1,44 @@
package de.miaurizius.jgame2d.tile.interactive;
import de.miaurizius.jgame2d.core.GamePanel;
import de.miaurizius.jgame2d.core.enums.EntityType;
import de.miaurizius.jgame2d.entity.Entity;
import java.awt.*;
public class DestructibleWallIT extends InteractiveTile {
GamePanel panel;
public DestructibleWallIT(GamePanel panel, int col, int row) {
super(panel, col, row);
this.panel = panel;
this.worldX = panel.tileSize * col;
this.worldY = panel.tileSize * row;
down1 = initEntitySprites("/interactive_tiles/destructiblewall");
destructible = true;
life = 3;
}
// PRE_CONFIGURED
public void playSE() {
panel.playSE(20);
}
// GETTERS
public boolean meetItemReq(Entity entity) {
return entity.currentWeapon.weaponType == EntityType.WeaponType.PICKAXE;
}
public Color getParticleColor() {
return new Color(65, 65,65);
}
public int getParticleSize() {
return 6; //in pixels
}
public int getParticleSpeed() {
return 1;
}
public int getParticleMaxLife() {
return 20;
}
}

View File

@@ -6,11 +6,11 @@ import de.miaurizius.jgame2d.entity.Entity;
import java.awt.*;
public class DryTreeTI extends InteractiveTile{
public class DryTreeIT extends InteractiveTile{
GamePanel panel;
public DryTreeTI(GamePanel panel, int col, int row) {
public DryTreeIT(GamePanel panel, int col, int row) {
super(panel, col, row);
this.panel = panel;
this.worldX = panel.tileSize * col;
@@ -18,7 +18,7 @@ public class DryTreeTI extends InteractiveTile{
down1 = initEntitySprites("/interactive_tiles/drytree");
destructible = true;
life = 3;
life = 2;
}
// PRE_CONFIGURED

View File

@@ -0,0 +1,26 @@
package de.miaurizius.jgame2d.tile.interactive;
import de.miaurizius.jgame2d.core.GamePanel;
public class MetalPlateIT extends InteractiveTile {
GamePanel panel;
public MetalPlateIT(GamePanel panel, int col, int row) {
super(panel, col, row);
this.panel = panel;
this.name = "metal_plate";
this.worldX = panel.tileSize * col;
this.worldY = panel.tileSize * row;
down1 = initEntitySprites("/interactive_tiles/metalplate");
solidArea.x = 0;
solidArea.y = 0;
solidArea.width = 0;
solidArea.height = 0;
solidAreaDefaultX = 0;
solidAreaDefaultY = 0;
}
}