add BigRockNPC and IronDoorObj; update AssetSetter to include new NPC and interactive tiles
This commit is contained in:
36
src/de/miaurizius/jgame2d/entity/obstacle/IronDoorObj.java
Normal file
36
src/de/miaurizius/jgame2d/entity/obstacle/IronDoorObj.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package de.miaurizius.jgame2d.entity.obstacle;
|
||||
|
||||
import de.miaurizius.jgame2d.core.GamePanel;
|
||||
import de.miaurizius.jgame2d.core.enums.EntityType;
|
||||
import de.miaurizius.jgame2d.entity.Entity;
|
||||
|
||||
public class IronDoorObj extends Entity {
|
||||
GamePanel panel;
|
||||
|
||||
public IronDoorObj(GamePanel panel) {
|
||||
super(panel);
|
||||
this.panel = panel;
|
||||
name = "door";
|
||||
type = EntityType.OBSTACLE;
|
||||
down1 = initEntitySprites("objects/door_iron");
|
||||
collision = true;
|
||||
|
||||
solidArea.x = 0;
|
||||
solidArea.y = 16;
|
||||
solidArea.width = 48;
|
||||
solidArea.height = 32;
|
||||
solidAreaDefaultX = solidArea.x;
|
||||
solidAreaDefaultY = solidArea.y;
|
||||
|
||||
setDialogue();
|
||||
}
|
||||
|
||||
public void setDialogue() {
|
||||
dialogue[0][0] = "It won't budge.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void interact() {
|
||||
startDialogue(this,0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user