Package rekit.logic.level
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.-
Field Summary
Fields inherited from class rekit.logic.level.Structure
autoCoinSpawn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
applyAlias
(String src) Get alias.int
build
(int levelX) Adds all GameElements specified in the Structures template structureArray relative to a given x position.void
endBattle
(ILevelScene scene) End the battle.void
Start the battle.
-
Constructor Details
-
BossStructure
Create a boss structure.- Parameters:
structure
- the structure definitionboss
- the boss
-
-
Method Details
-
applyAlias
Description copied from class:Structure
Get alias.- Overrides:
applyAlias
in classStructure
- 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,
viaGameElementFactory
is used to add Elements to a Scene, so it must be initialized with a Scene. -
startBattle
public void startBattle()Start the battle. -
endBattle
End the battle.- Parameters:
scene
- the scene
-