Package playground

Class LevelMovingHitObjects


public class LevelMovingHitObjects extends SpaceInvadersLevel
Level that creates two RectObjects moving around and if ego is hit by them game is directly lost (lives = 0).
  • Constructor Details

    • LevelMovingHitObjects

      public LevelMovingHitObjects()
  • Method Details

    • prepareLevel

      public void prepareLevel(String id)
      Description copied from class: SpaceInvadersLevel
      initially sets up the level. Not called by user interaction, but called every time a layer is restarted from scratch. So make sure that this is possible. Here, resources are loaded only once even if method is called several times.
      Overrides:
      prepareLevel in class SpaceInvadersLevel
      Parameters:
      id - String identifies level.