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.intbuild(int levelX) Adds all GameElements specified in the Structures template structureArray relative to a given x position.voidendBattle(ILevelScene scene) End the battle.voidStart the battle.
-
Constructor Details
-
BossStructure
Create a boss structure.- Parameters:
structure- the structure definitionboss- the boss
-
-
Method Details
-
applyAlias
Description copied from class:StructureGet alias.- Overrides:
applyAliasin 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:StructureAdds 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,
viaGameElementFactoryis 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
-