You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.2 KiB

//neue Unterklasse von SpaceInvadersLevel von Teamm 66
package playground;
// import utilities.* ;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.RenderingHints;
import java.awt.font.TextAttribute;
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.AttributedString;
import java.util.LinkedList;
import controller.EnemyController;
import controller.FallingStarController;
import controller.LimitedTimeController;
import controller.ObjectController;
import controller.EgoController;
import controller.CollisionAwareEgoController;
import gameobjects.AnimatedGameobject;
import gameobjects.FallingStar;
import gameobjects.GameObject;
import gameobjects.EgoObject;
import gameobjects.TextObject;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
/**
* Class that realizes all the game logic of a very simple game level. The level contains for now
* only two objects that are {@link GameObject} subclasses: {@link FallingStar} and
* {@link EgoObject}. Functions performed by this class are:
* <ul>
* <li>initially set up the level, spawn all object etc., in method {@link #prepareLevel}
* <li>React to game events in {@link #actionIfEgoCollidesWithCollect(GameObject, GameObject)} ,
* {@link #actionIfEgoCollidesWithEnemy(GameObject, GameObject)}, etc.
* <li>define basic object movement rules for all objects in the level in the various
* ObjectController subclasses: {@link EgoController} and {@link FallingStarController}.
* </ul>
*/
public class SpaceInvadersLevelAua extends SpaceInvadersLevel {
/**
* implements game behavior if an enemy object is hit by a players' shot. It creates an explosion
* effect, plays a sound and adds 200 points to the current score (and it removes the enemy object
* and the shot object).
*
* @param e enemy which was hit
* @param shot the shot object that hit the enemy
*/
// überschreibt Ausgabe auf Konsole: "AUA!!"
@Override
void actionIfEnemyIsHit(GameObject e, GameObject shot) {
super.actionIfEnemyIsHit(e, shot); // Methode aus Elternklasse
// print aua on console
System.out.println("AUA!!");
}
}