mirror of
				https://github.com/Klagarge/PokeHES.git
				synced 2025-10-31 03:39:16 +00:00 
			
		
		
		
	fix map
This commit is contained in:
		| @@ -81,30 +81,11 @@ public class Player extends Character{ | ||||
| 					x = ScreenMap.Door.nextX; | ||||
| 					y = ScreenMap.Door.nextY; | ||||
| 					goalDirection = ScreenMap.Door.nextDirection; | ||||
| 					/* | ||||
| 					if (ScreenMap.Door.changeDirection) { | ||||
| 						switch (goalDirection) { | ||||
| 							case UP: | ||||
| 								goalDirection = Direction.DOWN; | ||||
| 								System.out.println("go down"); | ||||
| 								break; | ||||
|  | ||||
| 							case DOWN: | ||||
| 								goalDirection = Direction.UP; | ||||
| 								System.out.println("go up"); | ||||
| 						 | ||||
| 							default: | ||||
| 								goalDirection = Direction.NULL; | ||||
| 								break; | ||||
| 						} | ||||
| 					} | ||||
| 					*/ | ||||
| 				} catch (Exception e) { } | ||||
| 				ScreenMap.Door.reset(); | ||||
| 				if (nMap == null || x == null || y == null) return; | ||||
| 				map = nMap; | ||||
| 				setPosition(x*sm.tileWidth, y*sm.tileHeight); | ||||
| 				System.out.println(goalDirection); | ||||
| 				turn(goalDirection); | ||||
| 				System.out.println("Go to: " + map + " in " + x + " x " + y); | ||||
| 			} | ||||
|   | ||||
| @@ -181,7 +181,6 @@ public class ScreenMap extends RenderingScreen{ | ||||
| 				try { Door.nextX = Integer.parseInt(mapProperties.get("nextX").toString()); } catch (Exception e) { } | ||||
| 				try { Door.nextY = Integer.parseInt(mapProperties.get("nextY").toString()); } catch (Exception e) { } | ||||
|                 try { Door.nextDirection = Character.Direction.valueOf(mapProperties.get("nextDirection").toString()); } catch (Exception e) { } | ||||
| 				try { Door.changeDirection = Boolean.parseBoolean(mapProperties.get("changeDirection").toString()); } catch (Exception e) { } | ||||
| 			} | ||||
|         } | ||||
|          | ||||
| @@ -193,14 +192,12 @@ public class ScreenMap extends RenderingScreen{ | ||||
| 		public static Integer nextX; | ||||
| 		public static Integer nextY; | ||||
|         public static Character.Direction nextDirection; | ||||
|         public static Boolean changeDirection; | ||||
|  | ||||
| 		public static void reset(){ | ||||
| 			nextMap = null; | ||||
| 			nextX = null; | ||||
| 			nextY = null; | ||||
|             nextDirection = null; | ||||
|             changeDirection = null; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user