package de.miaurizius.jgame2d.entity.obstacle;

import de.miaurizius.jgame2d.core.GamePanel;
import de.miaurizius.jgame2d.core.enums.EntityType;
import de.miaurizius.jgame2d.core.enums.GameState;
import de.miaurizius.jgame2d.entity.Entity;

public class DoorObj extends Entity {

    GamePanel panel;

    public DoorObj(GamePanel panel) {
        super(panel);
        this.panel = panel;
        name = "door";
        type = EntityType.OBSTACLE;
        down1 = initEntitySprites("objects/door");
        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] = "You need a key to open this.";
    }

    @Override
    public void interact() {
        startDialogue(this,0);
    }

}
