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:
		| @@ -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){ | ||||
|  | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user