Package playground

Class Level5to7

Direct Known Subclasses:
Level5, Level6, Level7

public class Level5to7 extends SpaceInvadersLevel
  • Constructor Details

    • Level5to7

      public Level5to7()
  • Method Details

    • actionIfEnemyIsHit

      void actionIfEnemyIsHit(GameObject e, GameObject shot)
      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 class SpaceInvadersLevel
      Parameters:
      e - enemy which was hit
      shot - the shot object that hit the enemy