biggg
							parent
							
								
									be5b9617b5
								
							
						
					
					
						commit
						9cf2ceca5c
					
				|  | @ -1,17 +1,17 @@ | ||||||
| ################################### | ################################### | ||||||
| #                                 # | #.                               .# | ||||||
| # ##### ###### ###### ###### #### # | # ##### ###### ###### ###### #### # | ||||||
| #              ######             # | #      .       ######       .     # | ||||||
| # ##### ###### ###### ###### #### # | # ##### ###### ###### ###### #### # | ||||||
| # ##### ######        ###### #### # | # ##### ######        ###### #### # | ||||||
| #              ######             #  | #      .       ######       .     #  | ||||||
| # ##### ###### ,0123, ###### #### # | # ##### ###### ,0123, ###### #### # | ||||||
| #   ### ###### ###### ###### ##   # | #   ### ###### ###### ###### ##   # | ||||||
| # #            #  P #           # # | # #    .       #  P #       .   # # | ||||||
| # ##### ###### # ## # ###### #### # | # ##### ###### # ## # ###### #### # | ||||||
| # #              ##             # # | # #    .         ##         .   # # | ||||||
| #   ### ######## ## ######## ##   # | #   ### ######## ## ######## ##   # | ||||||
| # ##### #######      ####### #### # | # ##### #######      ####### #### # | ||||||
| # ##### ####### #### ####### #### # | # ##### ####### #### ####### #### # | ||||||
| #                                 # | #.                               .# | ||||||
| ################################### | ################################### | ||||||
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 178 B | 
|  | @ -7,3 +7,4 @@ | ||||||
| /Picture.class | /Picture.class | ||||||
| /Player.class | /Player.class | ||||||
| /Point.class | /Point.class | ||||||
|  | /BigPoint.class | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								bin/Game.class
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Game.class
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								bin/Map.class
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Map.class
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -0,0 +1,24 @@ | ||||||
|  | // Diese Klasse stellt die einzelnen Bicks (Wände) auf der Map dar.
 | ||||||
|  | 
 | ||||||
|  | public class BigPoint extends Picture { // Die übergeordnete Klasse ist Picture
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	private static final long serialVersionUID = -1204077187616807301L; | ||||||
|  | 
 | ||||||
|  | 	 | ||||||
|  | 	public int xPos; // Position auf dem Frame in x-Richtung
 | ||||||
|  | 	public int yPos; // Position auf dem Frame in y-Richtung
 | ||||||
|  | 
 | ||||||
|  | 	public BigPoint(int newXPos, int newYPos) { // Erstellen des Konstruktors mit den Koordinaten, an denen sich der Brick
 | ||||||
|  | 												// beefinden soll.
 | ||||||
|  | 
 | ||||||
|  | 		super("bigpoint"); // Aufrufen der übergeordneten Klasse
 | ||||||
|  | 
 | ||||||
|  | 		// Setzen der Positionen:
 | ||||||
|  | 		xPos = newXPos; | ||||||
|  | 		yPos = newYPos; | ||||||
|  | 
 | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | @ -120,6 +120,15 @@ public class Game { | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | 		for (int i = 0; i < 35; i++) { // für jeden Brick // points
 | ||||||
|  | 			for (int j = 0; j < 35; j++) { // für jeden Brick
 | ||||||
|  | 				if (Map.bigpoints[j][i] != null) { // Damit kein Fehler auftritt wegen nicht vorhandenen Bricks
 | ||||||
|  | 					panel.add(Map.bigpoints[j][i]); // Der jeweilige Brick wird zum panel hinzugefügt
 | ||||||
|  | 					Map.bigpoints[j][i].setBounds(Map.bigpoints[j][i].xPos, Map.bigpoints[j][i].yPos, 20, 20); // Rendern des
 | ||||||
|  | 
 | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 		frame.setVisible(true); | 		frame.setVisible(true); | ||||||
| 
 | 
 | ||||||
| 		lastT = System.nanoTime(); // delta time
 | 		lastT = System.nanoTime(); // delta time
 | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ public class Map { | ||||||
| 
 | 
 | ||||||
| 	public static Brick bricks[][] = new Brick[35][35]; // Zweidimensionales Array für alle Bricks
 | 	public static Brick bricks[][] = new Brick[35][35]; // Zweidimensionales Array für alle Bricks
 | ||||||
| 	public static Point points[][] = new Point[35][35]; | 	public static Point points[][] = new Point[35][35]; | ||||||
|  | 	public static BigPoint bigpoints[][] = new BigPoint[35][35]; | ||||||
| 	// Zweidimensionale Arrays siehe
 | 	// Zweidimensionale Arrays siehe
 | ||||||
| 	// https://de.wikipedia.org/wiki/Feld_(Datentyp)#Mehrdimensional_/_in-sich-mehrdimensional
 | 	// https://de.wikipedia.org/wiki/Feld_(Datentyp)#Mehrdimensional_/_in-sich-mehrdimensional
 | ||||||
| 
 | 
 | ||||||
|  | @ -73,6 +74,9 @@ public class Map { | ||||||
| 						} else if (line.charAt(j) == ' ') { | 						} else if (line.charAt(j) == ' ') { | ||||||
| 							points[i][j] = new Point(10 + 20 * j, 10 + 20 * i); | 							points[i][j] = new Point(10 + 20 * j, 10 + 20 * i); | ||||||
| 							maxScore++; | 							maxScore++; | ||||||
|  | 						} else if (line.charAt(j) == '.') { | ||||||
|  | 							bigpoints[i][j] = new BigPoint(10 + 20 * j, 10 + 20 * i); | ||||||
|  | 							 | ||||||
| 						} | 						} | ||||||
| 					} catch (Exception e) { | 					} catch (Exception e) { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue