2022-05-25 15:32:53 +02:00
|
|
|
package Entity;
|
|
|
|
|
2022-06-08 23:30:15 +02:00
|
|
|
import Text.TextEnemy;
|
2022-06-08 20:04:16 +02:00
|
|
|
|
2022-06-01 16:47:53 +02:00
|
|
|
import com.badlogic.gdx.math.Vector2;
|
|
|
|
|
2022-06-07 21:35:13 +02:00
|
|
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
|
|
|
|
2022-05-25 15:32:53 +02:00
|
|
|
public class Enemy extends Character{
|
2022-06-09 17:32:47 +02:00
|
|
|
private String map;
|
2022-06-07 21:35:13 +02:00
|
|
|
|
2022-06-08 23:30:15 +02:00
|
|
|
public TextEnemy textEnemy;
|
2022-06-08 20:04:16 +02:00
|
|
|
|
2022-06-09 17:32:47 +02:00
|
|
|
public Enemy(String name, int x, int y, String img, String map) {
|
2022-06-07 21:35:13 +02:00
|
|
|
super(name, x, y, img);
|
2022-06-08 23:30:15 +02:00
|
|
|
//generate his text
|
|
|
|
this.textEnemy = new TextEnemy(name);
|
|
|
|
textEnemy.generateText();
|
2022-06-09 17:32:47 +02:00
|
|
|
this.map = map;
|
2022-06-08 20:04:16 +02:00
|
|
|
|
2022-06-08 20:08:18 +02:00
|
|
|
turn(Character.Direction.DOWN);
|
2022-06-08 20:04:16 +02:00
|
|
|
//generate the vector of fight
|
|
|
|
fightData = new FightData(name);
|
2022-06-01 16:47:53 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-06-09 17:32:47 +02:00
|
|
|
public String getMap() {
|
|
|
|
return map;
|
2022-06-01 16:47:53 +02:00
|
|
|
}
|
|
|
|
|
2022-06-09 17:32:47 +02:00
|
|
|
public void setPosition(int x, int y, String map){
|
|
|
|
position.set(x, y);
|
|
|
|
this.map = map;
|
2022-06-01 16:47:53 +02:00
|
|
|
}
|
|
|
|
|
2022-06-09 17:32:47 +02:00
|
|
|
public void setPosition(Vector2 vPosition, String map){
|
|
|
|
setPosition((int)vPosition.x, (int)vPosition.y, map);
|
2022-06-01 16:47:53 +02:00
|
|
|
}
|
2022-06-07 21:35:13 +02:00
|
|
|
|
|
|
|
@Override
|
2022-06-01 16:47:53 +02:00
|
|
|
protected void removedPv(int pv) {
|
2022-06-07 21:35:13 +02:00
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
2022-06-01 16:47:53 +02:00
|
|
|
|
2022-05-25 15:32:53 +02:00
|
|
|
}
|