1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-07-07 17:01:10 +00:00

near to done

This commit is contained in:
2022-06-08 20:08:18 +02:00
parent 3368e1b8c4
commit 4843f5d1d8
8 changed files with 31 additions and 208 deletions

View File

@ -8,7 +8,7 @@ public class Enemy extends Character{
public Enemy(String name, int x, int y, String img) {
super(name, x, y, img);
//TODO Auto-generated constructor stub
turn(Character.Direction.DOWN);
}
public void setPosition(int x, int y){
@ -24,11 +24,5 @@ public class Enemy extends Character{
// TODO Auto-generated method stub
}
@Override
public void draw(GdxGraphics arg0) {
// TODO Auto-generated method stub
}
}

View File

@ -36,7 +36,6 @@ public abstract class Entity implements DrawableObject {
}
public void init(){
}
public void graphicRender(GdxGraphics g){

View File

@ -14,7 +14,7 @@ public class Player extends Character{
private int xp;
public Player(int x, int y) {
super("Player", x, y, "lumberjack_sheet32");
super("Player", x, y, "Character");
}
public void addXp(int xp){
@ -46,9 +46,11 @@ public class Player extends Character{
// Is the move valid ?
if (sm.isWalkable(nextCell)) {
// Go
setSpeed(sm.getSpeed(nextCell));
go(goalDirection);
if(!enemy()){
// Go
setSpeed(sm.getSpeed(nextCell));
go(goalDirection);
}
} else {
// Face the wall
turn(goalDirection);
@ -73,7 +75,11 @@ public class Player extends Character{
}
}
public void move(int x, int y){
private boolean enemy() {
return false;
}
public void move(int x, int y){
}