Package playground
Class Level6
java.lang.Object
playground.Playground
playground.SpaceInvadersLevel
playground.Level5to7
playground.Level6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final double
protected static final double
protected static final int
Fields inherited from class playground.SpaceInvadersLevel
alienImage, alienshowTime, BONUS_DURATION, CANVASX, CANVASY, doneLevel, DYING_INTERVAL, EGORAD, EGOSPEED, enemyAnim, ENEMYSCALE, ENEMYSHOTSPEED, EXPL_COLOR, EXPL_DURATION, heartAnim, heartImage, heartshowTime, laser, LEVEL_INIT_TIME, LEVEL2STARS, lost, nextShot, NR_COLLECT, 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 double
returns a number representing the speed of an enemy object in X direction (pixels/second)protected double
returns a number representing the speed of an enemy object in Y direction (pixels/second)protected int
returns the maximum number of enemy instances (which are created at level start)protected String
simply returns the text that should be displayed at level startMethods inherited from class playground.Level5to7
actionIfEnemyIsHit
Methods inherited from class playground.SpaceInvadersLevel
actionIfEgoCollidesWithCollect, actionIfEgoCollidesWithEnemy, actionIfEgoObjectIsHit, applyGameLogic, calcEnemyShotProb, calcNrCollect, createCollectables, createEgoObject, createEnemies, createEnemyController, createEnemyShot, createEnemyShotObject, createExplosion, createSingleCollect, createSingleEnemy, createStars, gameOver, levelFinished, preferredSizeX, preferredSizeY, prepareLevel, 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
-
Field Details
-
ENEMYSPEEDX
protected static final double ENEMYSPEEDX- See Also:
-
ENEMYSPEEDY
protected static final double ENEMYSPEEDY- See Also:
-
NR_ENEMIES
protected static final int NR_ENEMIES- See Also:
-
-
Constructor Details
-
Level6
public Level6()
-
-
Method Details
-
calcNrEnemies
protected int calcNrEnemies()Description copied from class:SpaceInvadersLevel
returns the maximum number of enemy instances (which are created at level start)- Overrides:
calcNrEnemies
in classSpaceInvadersLevel
- Returns:
- a positive value
-
calcEnemySpeedX
protected double calcEnemySpeedX()Description copied from class:SpaceInvadersLevel
returns a number representing the speed of an enemy object in X direction (pixels/second)- Overrides:
calcEnemySpeedX
in classSpaceInvadersLevel
- Returns:
- a positive value
-
calcEnemySpeedY
protected double calcEnemySpeedY()Description copied from class:SpaceInvadersLevel
returns a number representing the speed of an enemy object in Y direction (pixels/second)- Overrides:
calcEnemySpeedY
in classSpaceInvadersLevel
- Returns:
- a positive value
-
getStartupMessage
Description copied from class:SpaceInvadersLevel
simply returns the text that should be displayed at level start- Overrides:
getStartupMessage
in classSpaceInvadersLevel
- Returns:
- a string that is displayed at start. Should be not longer than 30 characters.
-