ScreenLevelFinish #64
| @ -28,33 +28,25 @@ public class MenuAccueil extends StackPane { | ||||
|                 System.out.println(choosediff); | ||||
|                 switch (choosediff) { | ||||
|                     case "Easy": | ||||
|                         SlctDifficulty.setOnAction(event1 -> { | ||||
|                             try { | ||||
|                                 Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy))); | ||||
|                             } catch (FileNotFoundException e) { | ||||
|                                 throw new RuntimeException(e); | ||||
|                             } | ||||
|                         }); | ||||
|                         try { | ||||
|                             Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy))); | ||||
|                         } catch (FileNotFoundException e) { | ||||
|                             throw new RuntimeException(e); | ||||
| 
					
					Mat_02 marked this conversation as resolved
					
				 | ||||
|                         } | ||||
|                         break; | ||||
|                     case "Medium": | ||||
|                         SlctDifficulty.setOnAction(event1 -> { | ||||
|                             try { | ||||
|                                 Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Medium))); | ||||
|                             } catch (FileNotFoundException e) { | ||||
|                                 throw new RuntimeException(e); | ||||
|                             } | ||||
|                         }); | ||||
|  | ||||
|                         break; | ||||
|                     case "Difficult": | ||||
|                         SlctDifficulty.setOnAction(event1 -> { | ||||
|                             try { | ||||
|                                 Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult))); | ||||
|                             } catch (FileNotFoundException e) { | ||||
|                                 throw new RuntimeException(e); | ||||
|                             } | ||||
|                         }); | ||||
|  | ||||
|                         break; | ||||
|                 } | ||||
|             }); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	
Le
MapGenerator.generate()retourne uneMapCette Map doit ensuite être chargée par
GameUI(Map)Il faudrait du coup