Package playground
Class Level5to7
java.lang.Object
playground.Playground
playground.SpaceInvadersLevel
playground.Level5to7
-
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 TypeMethodDescription(package private) void
actionIfEnemyIsHit
(GameObject e, GameObject shot) implements game behavior if an enemy object is hit by a players' shot.Methods inherited from class playground.SpaceInvadersLevel
actionIfEgoCollidesWithCollect, actionIfEgoCollidesWithEnemy, actionIfEgoObjectIsHit, applyGameLogic, calcEnemyShotProb, calcEnemySpeedX, calcEnemySpeedY, calcNrCollect, calcNrEnemies, createCollectables, createEgoObject, createEnemies, createEnemyController, createEnemyShot, createEnemyShotObject, createExplosion, createSingleCollect, createSingleEnemy, createStars, gameOver, getStartupMessage, 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
-
Constructor Details
-
Level5to7
public Level5to7()
-
-
Method Details
-
actionIfEnemyIsHit
Description copied from class: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).- Overrides:
actionIfEnemyIsHit
in classSpaceInvadersLevel
- Parameters:
e
- enemy which was hitshot
- the shot object that hit the enemy
-