001package vooga.shooter.implementation;
002
003import java.awt.Dimension;
004import java.awt.Graphics;
005import java.awt.Image;
006import java.awt.Point;
007import java.util.List;
008import javax.swing.ImageIcon;
009import vooga.shooter.level_editor.Level;
010import vooga.shooter.gameObjects.Sprite;
011import vooga.shooter.gameObjects.Enemy;
012import vooga.shooter.gameplay.Game;
013
014
015/**
016 * First level (initializes enemies, sets winning conditions)
017 * 
018 * @author Tommy Petrilak
019 * 
020 */
021public class LostGame extends Level {
022
023    private static final int NUMBER_OF_STAGES = 1;
024    private static final int NUMBER_OF_ENEMIES = 1;
025    private static final Dimension ENEMY_DIMENSION = new Dimension(60, 51);
026    private static final Point ENEMY_VELOCITY = new Point(0, 0);
027    private static final int ENEMY_DAMAGE = 1;
028    private static final String LOST_GAME = "YOU LOSE -- THE ALIENS WON";
029
030    private Game myGame;
031    private Level myNextLevel;
032
033    public LostGame (Game game) {
034        super();
035        myGame = game;
036        myNextLevel = null;
037    }
038
039    public void startLevel () {
040        ImageIcon imageIcon = new ImageIcon(this.getClass().getResource("../images/alien.png"));
041        Image enemyImage = imageIcon.getImage();
042        myGame.addEnemy(new Enemy(new Point(myGame.getCanvasDimension().width / 2, myGame
043                .getCanvasDimension().height / 2), ENEMY_DIMENSION, myGame.getCanvasDimension(),
044                enemyImage, ENEMY_VELOCITY, ENEMY_DAMAGE));
045    }
046
047    public void paint (Graphics pen) {
048        pen.drawString(LOST_GAME, myGame.getCanvasDimension().width / 2,
049                       myGame.getCanvasDimension().height / 2);
050    }
051
052    @Override
053    public boolean winningConditionsMet () {
054        return false;
055    }
056
057}