From c137c9080af3f8e029fe4086e3bcf943e8d8c576 Mon Sep 17 00:00:00 2001 From: Lenz Date: Sun, 7 Jun 2020 17:09:33 +0200 Subject: [PATCH] mapmenu angefangen --- assets/Maps/map1.txt | 22 ++++++++++++ assets/Maps/map2.txt | 20 +++++++++++ assets/Maps/map3.txt | 32 +++++++++++++++++ assets/Maps/map4.txt | 33 ++++++++++++++++++ assets/Maps/map5.txt | 32 +++++++++++++++++ assets/Maps/map6.txt | 32 +++++++++++++++++ assets/Maps/map7.txt | 29 ++++++++++++++++ assets/{Map.txt => Maps/map8.txt} | 0 bin/.gitignore | 1 + bin/BigPoint.class | Bin 462 -> 462 bytes bin/Game.class | Bin 9409 -> 9409 bytes bin/Ghost.class | Bin 2784 -> 2784 bytes bin/Lives.class | Bin 336 -> 336 bytes bin/Main.class | Bin 558 -> 564 bytes bin/Map.class | Bin 2579 -> 2579 bytes bin/Point.class | Bin 450 -> 450 bytes src/Main.java | 4 ++- src/MapMenu.java | 55 ++++++++++++++++++++++++++++++ 18 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 assets/Maps/map1.txt create mode 100644 assets/Maps/map2.txt create mode 100644 assets/Maps/map3.txt create mode 100644 assets/Maps/map4.txt create mode 100644 assets/Maps/map5.txt create mode 100644 assets/Maps/map6.txt create mode 100644 assets/Maps/map7.txt rename assets/{Map.txt => Maps/map8.txt} (100%) create mode 100644 bin/.gitignore create mode 100644 src/MapMenu.java diff --git a/assets/Maps/map1.txt b/assets/Maps/map1.txt new file mode 100644 index 0000000..f5aeff1 --- /dev/null +++ b/assets/Maps/map1.txt @@ -0,0 +1,22 @@ +##################### +#. .# +# ## ## ## ## ## ## # +# ## ## ## ## ## ## # +# . . # +# ## ## ## ## ## ## # +# ## ## ## ## ## ## # +# # +# ## ## ## ## ## ## # +# ## ## #0,1# ## ## # +# #,#,# # +# ## ## #2,3# ## ## # +# ## ## ##### ## ## # +# P # +# ## ## ## ## ## ## # +# ## ## ## ## ## ## # +# . . # +# ## ## ## ## ## ## # +# ## ## ## ## ## ## # +#. .# +##################### +Blocky diff --git a/assets/Maps/map2.txt b/assets/Maps/map2.txt new file mode 100644 index 0000000..2bc91c3 --- /dev/null +++ b/assets/Maps/map2.txt @@ -0,0 +1,20 @@ +Round and Round +################### +# # # # +# ### # # ### # +# .# ## ## #. # +# # # # # # # +# # ##### # # +## # # # # ## +# # # #0# # # # +# #. # # # # .# # +#2## # # # ##3# +# #. # # # # .# # +# # # #1# # # # +## # # # # ## +# # ##### # # +# # # # # # # +# .# ## ## #. # +# ### # # ### # +# # P # # +################### \ No newline at end of file diff --git a/assets/Maps/map3.txt b/assets/Maps/map3.txt new file mode 100644 index 0000000..94b706c --- /dev/null +++ b/assets/Maps/map3.txt @@ -0,0 +1,32 @@ +Ms Pac-Man +############################ +# ## ## # +#.#### ## ######## ## ####.# +# #### ## ######## ## #### # +# # +### ## ##### ## ##### ## ### +,,# ## ##### ## ##### ## #,, +### ## ##### ## ##### ## ### +,,# ## ## ## #,, +### ##### ######## ##### ### +,,# ##### ######## ##### #,, +,,# 01 #,, +,,# ##### ######## ##### #,, +,,# ##### # # ##### #,, +,,# ## #### ## #,, +,,# ## ## #2 3# ## ## #,, +### ## ## ######## ## ## ### +,,# ## ## #,, +### ######## ## ######## ### +,,# ######## ## ######## ### +,,# ## #,, +,,# ##### ######## ##### #,, +### ##### ######## ##### ### +# P # +# #### ##### ## ##### #### # +# #### ##### ## ##### #### # +# #### ## ## ## #### # +#.#### ## ######## ## ####.# +# #### ## ######## ## #### # +# # +############################ \ No newline at end of file diff --git a/assets/Maps/map4.txt b/assets/Maps/map4.txt new file mode 100644 index 0000000..262250c --- /dev/null +++ b/assets/Maps/map4.txt @@ -0,0 +1,33 @@ +[mir ist noch kein Titel eingefallen] +################################## +# # +# # ## ## ################# ## # # +# # ## ## ## ## # # +# # ## ################# ## ## # # +# # ## ## ## ## # # +# # ## ##.##############.## ## # # +# # ## ## ## ## # # +# # ## ## ################# ## # # +# # ## ## ## ## # # +# # ## ## ############## ## ## # # +# # ## ## ## ## # # +# # ## #######,####,####### ## # # +# # ## #######,####,####### ## # # +# # ## ##,,,,,,,,,,,## ## # # +# # ##### ##,## ## ##,## ##### # # +# ##### ##,#0,,,,1#,## ##### # +# #. ## ##,########,## ## .# # +# ### ## ##2,##,,,,##,3## ## ### # +# ### ## ###,,,,##,,,,### ## ### # +# ### ## ################ ## ### # +# ### ## ################ ## ### # +# ### ## # ## ### # +# ### ## ############## # ## ### # +# ### ## # # ## ### # +# ### ## #P############## ## ### # +# ### ## # # ## ### # +# ### ## # ############ # ## ### # +# ### ## # # ## ### # +# ### ## ###.########.### ## ### # +# # +################################## diff --git a/assets/Maps/map5.txt b/assets/Maps/map5.txt new file mode 100644 index 0000000..e011242 --- /dev/null +++ b/assets/Maps/map5.txt @@ -0,0 +1,32 @@ +Crazy Otto +############################ +# ## ## # +#.####### ## ## ## #######.# +# ####### ## ## ## ####### # +# ## ## ## # +# ## ## #### ## #### ## ## # +# ## #### ## #### ## # +#### ## #### #### ## #### +#### ## ## #### +# #### ######## #### # +# ## #### ######## #### ## # +# ## 01 ## # +# #### ## ######## ## #### # +# #### ## # # ## #### # +# ## #### ## # +# ## #### #2 3# #### ## # +# ## #### ######## #### ## # +# ## ## # +# #### ##### ## ##### #### # +# #### ##### ## ##### #### # +# ## ## ## # +### ## ## ######## ## ## ### +### ## ## ######## ## ## ### +#. ## P ## .# +# #### ##### ## ##### #### # +# #### ##### ## ##### #### # +# ## ## ## # +# #### ## ######## ## #### # +# #### ## ######## ## #### # +# ## ## # +############################ diff --git a/assets/Maps/map6.txt b/assets/Maps/map6.txt new file mode 100644 index 0000000..d495630 --- /dev/null +++ b/assets/Maps/map6.txt @@ -0,0 +1,32 @@ +Cookie-Man +############################ +# ## ## # +# #### ## ######## ## #### # +#.#### ## ######## ## ####.# +# ## ## ## # +### ## ## ## ## ## ## ## ### +### ## ## ## ## ## ## ## ### +# ## ## ## ## ## # +### ## ## ## ## ## ## ### +### ## ## ######## ## ## ### +# ## ## ######## ## ## ### +# #### 01 #### # +# #### ## ######## ## #### # +# ## # # ## # +### ##### #### ##### ### +### ##### #2 3# ##### ### +# ## ######## ## # +# #### ## ## #### # +# #### ## ######## ## #### # +# ## ## ######## ## ## # +### ## ## ## ## ## ### +,,# ## ## ## ## ## ## ## #,, +### ## ## ## ## ## ## ## ### +# ## P ## # +### ## ##### ## ##### ## ### +### ## ##### ## ##### ## ### +# ## ## ## # +# #### ## ######## ## #### # +#.#### ## ######## ## ####.# +# ## ## # +############################ diff --git a/assets/Maps/map7.txt b/assets/Maps/map7.txt new file mode 100644 index 0000000..d156a17 --- /dev/null +++ b/assets/Maps/map7.txt @@ -0,0 +1,29 @@ +Spider's Web +##################### +# # +# ## ########### ## # +# # +##### ######### ##### +# # +# #### ####### #### # +# # # # +# # ### ##### ### # # +# # # # # # +# # ## ### ## # # +# # # # # # +# # # ##### # # # +# # # # # # # # # # +# # # # # # # # # # +# # # ##### # # # +# # # # # # +# # ## ### ## # # +# # # # # # +# # ### ##### ### # # +# # # # +# #### ####### #### # +# # +##### ######### ##### +# # +# ## ########### ## # +# # +##################### \ No newline at end of file diff --git a/assets/Map.txt b/assets/Maps/map8.txt similarity index 100% rename from assets/Map.txt rename to assets/Maps/map8.txt diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..7ab2802 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +/MapMenu.class diff --git a/bin/BigPoint.class b/bin/BigPoint.class index e13d6a937dea2cd8c7a7638fd757da5d267f3548..c61b68a03100e48b0e700e8b5820a384917fb07d 100644 GIT binary patch delta 17 ZcmX@de2$sp)W2Q(7#J8VH*y?f1OP&92BZK0 delta 17 ZcmX@de2$sp)W2Q(7#J8#HgX(e1OP%*2A==` diff --git a/bin/Game.class b/bin/Game.class index a50dea20d4babc3ae04ef47ac33365202798aae1..626c3410290ee9509c87824438180ff45c759ce5 100644 GIT binary patch delta 278 zcmX@;dC-&N)W2Q(7#J8VH*!1_vf9R|Y^0^Ng&{rF}Y diff --git a/bin/Ghost.class b/bin/Ghost.class index 5f66ca37785ab10ebe945abccb0a8803ffd1c89e..48a3aa904d082c918c852d2b18e6a8478b1b4fe0 100644 GIT binary patch delta 17 ZcmaDL`aqQ9)W2Q(7#J8VH*(zI0suz#2L}KE delta 17 ZcmaDL`aqQ9)W2Q(7#J8#HgeqH0suzc2Lb>9 diff --git a/bin/Lives.class b/bin/Lives.class index 73940706978e1ff0579f0cb10b8dff15e8045777..e3e614eb5c782608fd9773a94486cfe7dda71dfd 100644 GIT binary patch delta 17 Zcmcb>bb*QE)W2Q(7#J8VH*$C|0suji1}Fdk delta 17 Zcmcb>bb*QE)W2Q(7#J8#Hgb3{0sujJ1|t9f diff --git a/bin/Main.class b/bin/Main.class index ef3f06657c480cca5388e7e157aa4fac9de8cadb..c53173a58d09ccf4b559e86d22c61249d6e15578 100644 GIT binary patch delta 60 zcmZ3-vW11?)W2Q(7#J8VH*#n&a+ePCi~jB{D}83Y&v JCvz~V0RTS{5ZV9$ delta 54 zcmdnOvW|u0)W2Q(7#J8#Hgae%va+}*=B7@zU{vKv2QnBL*nGeOIgE2zc^L#4_$Tu* GsR01N_zp(^ diff --git a/bin/Map.class b/bin/Map.class index 6541853c6cdb6e9ef6d43c5252a331c0aa8d7a4a..a288e72498e3c92c120a0bba09a85d96296c96d5 100644 GIT binary patch delta 17 ZcmbO%GFgP<)W2Q(7#J8VH*#=u0RTIm1)cx^ delta 17 ZcmbO%GFgP<)W2Q(7#J8#Hga%t0RTIN1(^T< diff --git a/bin/Point.class b/bin/Point.class index c3665100b051335181c293b55e347e6a5994a0af..8be2f7a1f67e37435136adf1602e4faa71cbe644 100644 GIT binary patch delta 17 ZcmX@ae2AIj)W2Q(7#J8VH*)M^1OPzQ27mwn delta 17 ZcmX@ae2AIj)W2Q(7#J8#HgfD@1OPz1273Si diff --git a/src/Main.java b/src/Main.java index d95f039..af5d4e7 100644 --- a/src/Main.java +++ b/src/Main.java @@ -10,8 +10,10 @@ public class Main { System.setProperty("sun.java2d.opengl", "true"); - Game game = new Game(); // Das Spiel wird gestartet + // Game game = new Game(); // Das Spiel wird gestartet + MapMenu menu = new MapMenu(); + } } diff --git a/src/MapMenu.java b/src/MapMenu.java new file mode 100644 index 0000000..7412418 --- /dev/null +++ b/src/MapMenu.java @@ -0,0 +1,55 @@ +import java.io.File; + +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; + +public class MapMenu extends JFrame { + + JButton button; + + JPanel panel; + + JComboBox bob; + + String[] maps; + + File path; + + Game game; + + public MapMenu() { + + super("Map Menu"); + + path = new File("assets/maps"); + + maps = path.list(); + + this.setVisible(true); + this.setBounds(100, 100, 300, 200); + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.setResizable(false); // Man kann die Größe des Frame nicht verändern + + panel = new JPanel(); // Panel auf dem visuellen Elemente angezeigt werden + + // Der Inhalt des Panels wird auf dem Frame angezeigt: + this.setContentPane(panel); + this.getContentPane().setLayout(null); + + + button = new JButton("Lauch dat shit"); + panel.add(button); + button.setBounds(20, 100, 150, 30); + + bob = new JComboBox(maps); + // bob.setEditable(true); + panel.add(bob); + bob.setBounds(30, 30, 180, 30); + + } + +}