mirror of
				https://github.com/Klagarge/PokeHES.git
				synced 2025-11-04 13:19:17 +00:00 
			
		
		
		
	fix bug !!! (hallelujah)
This commit is contained in:
		@@ -14,10 +14,10 @@ public class Player extends Character{
 | 
			
		||||
 | 
			
		||||
    private int xp;
 | 
			
		||||
	public Enemy lastEnemy = null;
 | 
			
		||||
	public boolean frontOfEnemy = false;
 | 
			
		||||
	public boolean onEnemy = false;
 | 
			
		||||
 | 
			
		||||
    public Player(int x, int y, String map) {
 | 
			
		||||
        super("Player", x, y, "Character", map);
 | 
			
		||||
        super("Player", x, y, "character", map);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void addXp(int xp){
 | 
			
		||||
@@ -32,7 +32,7 @@ public class Player extends Character{
 | 
			
		||||
			// Compute direction and next cell
 | 
			
		||||
			Vector<TiledMapTile> nextCell = new Vector<>();
 | 
			
		||||
			Player.Direction goalDirection = Player.Direction.NULL;
 | 
			
		||||
			Vector2 nextPos = position;
 | 
			
		||||
			Vector2 nextPos = new Vector2(position);
 | 
			
		||||
 | 
			
		||||
			if (c.keyStatus.get(Input.Keys.RIGHT)) {
 | 
			
		||||
				goalDirection = Player.Direction.RIGHT;
 | 
			
		||||
@@ -98,7 +98,7 @@ public class Player extends Character{
 | 
			
		||||
			
 | 
			
		||||
			if(bMap && pX==eX && pY==eY) {
 | 
			
		||||
				lastEnemy = enemy;
 | 
			
		||||
				frontOfEnemy = true;
 | 
			
		||||
				onEnemy = true;
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user