Class BossStructure

java.lang.Object
rekit.logic.level.Structure
rekit.logic.level.BossStructure
All Implemented Interfaces:
org.fuchss.configuration.Configurable

@SetterInfo(res="conf/bossstructure") public final class BossStructure extends Structure implements org.fuchss.configuration.Configurable
This class realizes a Structure for bosses.
  • Constructor Details

    • BossStructure

      public BossStructure(String[][] structure, Boss boss)
      Create a boss structure.
      Parameters:
      structure - the structure definition
      boss - the boss
  • Method Details

    • applyAlias

      protected String[] applyAlias(String src)
      Description copied from class: Structure
      Get alias.
      Overrides:
      applyAlias in class Structure
      Parameters:
      src - the source string
      Returns:
      the splitted definition for GameElementFactory.generate(String, int, int, String...)
    • build

      public int build(int levelX)
      Description copied from class: Structure

      Adds all GameElements specified in the Structures template structureArray relative to a given x position. Also, it generates plain floor to the structures right if specified via setGap(int gapWidth).
      Optional coin spawning can be activated with the parameter autoCoinSpawn.

      Additionally, the method returns the width of the build structure including the width of the (optional) gap.

      Internally, GameElementFactory is used to add Elements to a Scene, so it must be initialized with a Scene.

      via
      Overrides:
      build in class Structure
      Parameters:
      levelX - the x position in the level where to build this Structure to (inclusively)
      Returns:
      the width of the build structure plus the gapWidth.
    • startBattle

      public void startBattle()
      Start the battle.
    • endBattle

      public void endBattle(ILevelScene scene)
      End the battle.
      Parameters:
      scene - the scene