Package playground
Class LevelWithBox
java.lang.Object
playground.Playground
playground.SpaceInvadersLevel
playground.LevelWithBox
This class adds a new level to the game.
- Author:
- team22
-
Field Summary
Fields inherited from class playground.SpaceInvadersLevel
alienImage, alienshowTime, BONUS_DURATION, CANVASX, CANVASY, doneLevel, DYING_INTERVAL, EGORAD, EGOSPEED, enemyAnim, ENEMYSCALE, ENEMYSHOTSPEED, ENEMYSPEEDX, ENEMYSPEEDY, EXPL_COLOR, EXPL_DURATION, heartAnim, heartImage, heartshowTime, laser, LEVEL_INIT_TIME, LEVEL2STARS, lost, nextShot, NR_COLLECT, NR_ENEMIES, NRSHARDS, SHARDSPEED, SHOTSPEED, smash, STARSPEED, STARTPERIOD, STARTTEXTSPEED, starttime
Fields inherited from class playground.Playground
addables, canvasX, canvasY, flags, FLAGS_ALL, FLAGS_GLOBAL, FLAGS_LEVEL, gameObjects, gameTime, keyEvents, level, mouseEvents, pausedFlag, removables, timeStep
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
This method overrides the initial method to change the startup message.void
prepareLevel
(String id) This method overrides the initial method and adds a red rectangle on the top which does not do anything.Methods inherited from class playground.SpaceInvadersLevel
actionIfEgoCollidesWithCollect, actionIfEgoCollidesWithEnemy, actionIfEgoObjectIsHit, actionIfEnemyIsHit, applyGameLogic, calcEnemyShotProb, calcEnemySpeedX, calcEnemySpeedY, calcNrCollect, calcNrEnemies, createCollectables, createEgoObject, createEnemies, createEnemyController, createEnemyShot, createEnemyShotObject, createExplosion, createSingleCollect, createSingleEnemy, createStars, gameOver, levelFinished, preferredSizeX, preferredSizeY, redrawLevel, setupInitialState
Methods inherited from class playground.Playground
addObject, addObjectNow, collectObjects, deleteObject, deleteObjectNow, getGameTime, getGlobalFlag, getKeyEvents, getLevelFlag, getMouseEvents, getObject, getOrCreateGlobalFlag, getOrCreateLevelFlag, getSizeX, getSizeY, getTimestep, isPaused, processKeyEvents, processMouseEvents, redraw, reset, resetFlags, setGameTime, setGlobalFlag, setLevelFlag, setPaused, setTimestep, togglePause, updateObjects
-
Constructor Details
-
LevelWithBox
public LevelWithBox()
-
-
Method Details
-
prepareLevel
This method overrides the initial method and adds a red rectangle on the top which does not do anything.- Overrides:
prepareLevel
in classSpaceInvadersLevel
- Parameters:
id
- String identifies level
-
getStartupMessage
This method overrides the initial method to change the startup message.- Overrides:
getStartupMessage
in classSpaceInvadersLevel
- Returns:
- String Startup message
-