Browse Source

ha 10 fast fertig( login noch nach OBEN schieben)

master
fdai7222 2 years ago
parent
commit
7d98c959c8
  1. 1
      spaceinvaders/GameProject/bin/.gitignore
  2. BIN
      spaceinvaders/GameProject/bin/ui/GameUIWithLogin.class
  3. BIN
      spaceinvaders/GameProject/bin/ui/LoginWindow.class
  4. 145
      spaceinvaders/GameProject/log/log4j.log
  5. 9
      spaceinvaders/GameProject/src/ui/GameUIWithLogin.java
  6. 25
      spaceinvaders/GameProject/src/ui/LoginWindow.java

1
spaceinvaders/GameProject/bin/.gitignore

@ -1 +0,0 @@
/ui/

BIN
spaceinvaders/GameProject/bin/ui/GameUIWithLogin.class

BIN
spaceinvaders/GameProject/bin/ui/LoginWindow.class

145
spaceinvaders/GameProject/log/log4j.log

@ -5414,3 +5414,148 @@
2022-06-29 21:47:08,839 INFO playground.Animation - img added .\video/heart0.png 2022-06-29 21:47:08,839 INFO playground.Animation - img added .\video/heart0.png
2022-06-29 21:47:08,850 INFO playground.Animation - img added .\video/heart1.png 2022-06-29 21:47:08,850 INFO playground.Animation - img added .\video/heart1.png
2022-06-29 21:47:08,864 INFO playground.SpaceInvadersLevel - HIGHSCORE17200 2022-06-29 21:47:08,864 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-30 13:53:53,700 INFO base.GameLoop - GUI starts
2022-06-30 13:54:04,189 INFO base.GameLoop - GUI NEW
2022-06-30 13:54:04,199 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,200 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,200 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,200 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,201 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,202 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,203 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,204 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,204 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 13:54:04,205 INFO playground.BreakoutLevel2 - ego created.
2022-06-30 13:54:04,207 INFO playground.BreakoutLevel2 - ball created.
2022-06-30 13:54:04,210 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-30 13:54:44,522 INFO base.GameLoop - GUI starts
2022-06-30 13:55:49,152 INFO base.GameLoop - GUI starts
2022-06-30 14:00:46,334 INFO base.GameLoop - GUI starts
2022-06-30 14:00:49,331 INFO base.GameLoop - GUI NEW
2022-06-30 14:00:49,356 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,357 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,357 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,357 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,357 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,358 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,359 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,359 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,359 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,359 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,359 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,360 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,360 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,360 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,360 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,360 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,361 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,361 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,361 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,361 INFO playground.BreakoutLevel2 - brick created.
2022-06-30 14:00:49,367 INFO playground.BreakoutLevel2 - ego created.
2022-06-30 14:00:49,380 INFO playground.BreakoutLevel2 - ball created.
2022-06-30 14:00:49,382 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-30 14:01:10,180 INFO base.GameLoop - GUI starts
2022-06-30 14:03:53,963 INFO base.GameLoop - GUI NEW
2022-06-30 14:03:53,963 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-30 14:03:54,034 INFO playground.Animation - img added .\video/sweetAlien0.png
2022-06-30 14:03:54,042 INFO playground.Animation - img added .\video/sweetAlien1.png
2022-06-30 14:03:54,045 INFO playground.Animation - img added .\video/sweetAlien2.png
2022-06-30 14:03:54,049 INFO playground.Animation - img added .\video/sweetAlien3.png
2022-06-30 14:03:54,054 INFO playground.Animation - img added .\video/sweetAlien4.png
2022-06-30 14:03:54,058 INFO playground.Animation - img added .\video/sweetAlien5.png
2022-06-30 14:03:54,061 INFO playground.Animation - img added .\video/sweetAlien6.png
2022-06-30 14:03:54,064 INFO playground.Animation - img added .\video/sweetAlien7.png
2022-06-30 14:03:54,078 INFO playground.Animation - img added .\video/heart0.png
2022-06-30 14:03:54,081 INFO playground.Animation - img added .\video/heart1.png
2022-06-30 14:03:54,096 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-30 14:05:06,361 INFO base.GameLoop - GUI starts
2022-06-30 14:05:59,961 INFO base.GameLoop - GUI starts
2022-06-30 14:08:32,569 INFO base.GameLoop - GUI starts
2022-06-30 14:12:16,402 INFO base.GameLoop - GUI starts
2022-06-30 14:17:18,857 INFO base.GameLoop - GUI starts
2022-06-30 14:21:21,201 INFO base.GameLoop - GUI starts
2022-06-30 14:28:04,099 INFO base.GameLoop - GUI starts
2022-06-30 14:30:53,659 INFO base.GameLoop - GUI starts
2022-06-30 14:37:53,254 INFO base.GameLoop - GUI starts
2022-06-30 14:40:16,392 INFO base.GameLoop - GUI starts
2022-06-30 14:40:57,526 INFO base.GameLoop - GUI starts
2022-06-30 14:40:59,261 INFO base.GameLoop - GUI NEW
2022-06-30 14:40:59,261 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-30 14:40:59,314 INFO playground.Animation - img added .\video/sweetAlien0.png
2022-06-30 14:40:59,322 INFO playground.Animation - img added .\video/sweetAlien1.png
2022-06-30 14:40:59,325 INFO playground.Animation - img added .\video/sweetAlien2.png
2022-06-30 14:40:59,329 INFO playground.Animation - img added .\video/sweetAlien3.png
2022-06-30 14:40:59,333 INFO playground.Animation - img added .\video/sweetAlien4.png
2022-06-30 14:40:59,337 INFO playground.Animation - img added .\video/sweetAlien5.png
2022-06-30 14:40:59,341 INFO playground.Animation - img added .\video/sweetAlien6.png
2022-06-30 14:40:59,343 INFO playground.Animation - img added .\video/sweetAlien7.png
2022-06-30 14:40:59,351 INFO playground.Animation - img added .\video/heart0.png
2022-06-30 14:40:59,354 INFO playground.Animation - img added .\video/heart1.png
2022-06-30 14:40:59,359 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-30 14:42:58,367 INFO base.GameLoop - GUI starts
2022-06-30 14:43:00,033 INFO base.GameLoop - GUI NEW
2022-06-30 14:43:00,033 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-30 14:43:00,087 INFO playground.Animation - img added .\video/sweetAlien0.png
2022-06-30 14:43:00,095 INFO playground.Animation - img added .\video/sweetAlien1.png
2022-06-30 14:43:00,097 INFO playground.Animation - img added .\video/sweetAlien2.png
2022-06-30 14:43:00,102 INFO playground.Animation - img added .\video/sweetAlien3.png
2022-06-30 14:43:00,106 INFO playground.Animation - img added .\video/sweetAlien4.png
2022-06-30 14:43:00,110 INFO playground.Animation - img added .\video/sweetAlien5.png
2022-06-30 14:43:00,114 INFO playground.Animation - img added .\video/sweetAlien6.png
2022-06-30 14:43:00,116 INFO playground.Animation - img added .\video/sweetAlien7.png
2022-06-30 14:43:00,124 INFO playground.Animation - img added .\video/heart0.png
2022-06-30 14:43:00,127 INFO playground.Animation - img added .\video/heart1.png
2022-06-30 14:43:00,131 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-30 14:43:13,312 INFO base.GameLoop - GUI starts
2022-06-30 14:47:22,727 INFO base.GameLoop - GUI starts
2022-06-30 14:47:59,296 INFO base.GameLoop - GUI starts
2022-06-30 14:49:28,371 INFO base.GameLoop - GUI starts
2022-06-30 14:54:21,679 INFO base.GameLoop - GUI starts
2022-06-30 14:54:21,742 INFO base.GameLoop - GUI starts
2022-06-30 14:56:21,418 INFO base.GameLoop - GUI starts
2022-06-30 14:56:23,464 INFO base.GameLoop - GUI NEW
2022-06-30 14:56:23,464 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-30 14:56:23,530 INFO playground.Animation - img added .\video/sweetAlien0.png
2022-06-30 14:56:23,539 INFO playground.Animation - img added .\video/sweetAlien1.png
2022-06-30 14:56:23,543 INFO playground.Animation - img added .\video/sweetAlien2.png
2022-06-30 14:56:23,560 INFO playground.Animation - img added .\video/sweetAlien3.png
2022-06-30 14:56:23,565 INFO playground.Animation - img added .\video/sweetAlien4.png
2022-06-30 14:56:23,569 INFO playground.Animation - img added .\video/sweetAlien5.png
2022-06-30 14:56:23,574 INFO playground.Animation - img added .\video/sweetAlien6.png
2022-06-30 14:56:23,577 INFO playground.Animation - img added .\video/sweetAlien7.png
2022-06-30 14:56:23,592 INFO playground.Animation - img added .\video/heart0.png
2022-06-30 14:56:23,595 INFO playground.Animation - img added .\video/heart1.png
2022-06-30 14:56:23,604 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-30 14:56:27,833 INFO base.GameLoop - GUI starts
2022-06-30 14:57:29,052 INFO base.GameLoop - GUI starts
2022-06-30 14:58:25,283 INFO base.GameLoop - GUI starts
2022-06-30 15:01:00,254 INFO base.GameLoop - GUI starts
2022-06-30 15:01:45,637 INFO base.GameLoop - GUI starts
2022-06-30 15:02:35,132 INFO base.GameLoop - GUI starts
2022-06-30 15:03:06,961 INFO base.GameLoop - GUI starts
2022-06-30 15:03:46,445 INFO base.GameLoop - GUI starts
2022-06-30 15:04:29,495 INFO base.GameLoop - GUI starts
2022-06-30 16:48:22,817 INFO base.GameLoop - GUI starts
2022-06-30 16:49:00,156 INFO base.GameLoop - GUI starts

9
spaceinvaders/GameProject/src/ui/GameUIWithLogin.java

@ -19,8 +19,8 @@ public class GameUIWithLogin extends GameUI {
public GameUIWithLogin(int sizeX, int sizeY) { public GameUIWithLogin(int sizeX, int sizeY) {
super(sizeX, sizeY); super(sizeX, sizeY);
this.loginItem = new JMenuItem("Login... P E N I S"); // legt den button an (mit String name)
this.playItem.addActionListener(this); //added den listener
this.loginItem = new JMenuItem("Login..."); // legt den button an (mit String name)
this.loginItem.addActionListener(this); //added den listener
this.gameMenu.add(loginItem); // added den Button zum Menue this.gameMenu.add(loginItem); // added den Button zum Menue
} }
@ -29,6 +29,11 @@ public class GameUIWithLogin extends GameUI {
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
super.actionPerformed(ae); super.actionPerformed(ae);
if(ae.getSource() == this.loginItem) { if(ae.getSource() == this.loginItem) {
System.out.println();
System.out.println("test");
LoginWindow login = new LoginWindow(0,0);
//JFrame login = new JFrame();
//login.setVisible(true);
} }

25
spaceinvaders/GameProject/src/ui/LoginWindow.java

@ -5,7 +5,7 @@ import javax.swing.*;
import playground.Playground; import playground.Playground;
import java.awt.event.*; import java.awt.event.*;
public class LoginWindow extends GameUIWithLogin {
public class LoginWindow extends GameUIWithLogin implements ActionListener {
JFileChooser fc; JFileChooser fc;
JFrame frame = null; JFrame frame = null;
@ -42,11 +42,26 @@ public class LoginWindow extends GameUIWithLogin {
this.tf2.addActionListener(this); this.tf2.addActionListener(this);
this.login.addActionListener(this); this.login.addActionListener(this);
this.frame.setSize(250, 300);
this.frame.setSize(200, 200);
this.frame.setVisible(true); this.frame.setVisible(true);
} }
@Override
public void actionPerformed(ActionEvent ae) {
if(ae.getSource() == this.login) {
if(tf1.getText().equals("user") && tf2.getText().equals("pw")) {
JOptionPane.showMessageDialog(contentPane, "Login successfully");
this.frame.dispose();
} else {
JOptionPane.showMessageDialog(contentPane, "Login failed - Try again", "Login failed", JOptionPane.ERROR_MESSAGE);
}
}
}
public static int getNewAction() {
return getNewAction();
}
} }
Loading…
Cancel
Save