1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-10-31 03:39:16 +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

@@ -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){
}