Package rekit.logic.gameelements.type
Class Enemy
java.lang.Object
rekit.logic.gameelements.GameElement
rekit.logic.gameelements.entities.Entity
rekit.logic.gameelements.type.Enemy
- All Implemented Interfaces:
Collidable
This class is the parent class of all Enemies in the game.
-
Nested Class Summary
Nested classes/interfaces inherited from interface rekit.logic.Collidable
Collidable.Optional -
Field Summary
Fields inherited from class rekit.logic.gameelements.entities.Entity
invincibility, livesFields inherited from class rekit.logic.gameelements.GameElement
deleteMe, deltaTime, team, visible -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract EnemyStub Factory method that everyGameElementmust implement in order to being able to be instantiated dynamically by the level creation.static final Set<? extends GameElement>Load all Enemies.Methods inherited from class rekit.logic.gameelements.entities.Entity
addDamage, collidedWithSolid, getLives, innerLogicLoop, isVisible, logicLoop, setLivesMethods inherited from class rekit.logic.gameelements.GameElement
checkCollision, destroy, getDeleteMe, getFrame, getPos, getScene, getSize, getTeam, getVel, getZ, getZHint, init, internalRender, isAddableToGroup, killBoost, reactToCollision, render, setPos, setScene, setSize, setVel
-
Constructor Details
-
Enemy
protected Enemy()Prototype Constructor. -
Enemy
Create an Enemy.- Parameters:
startPos- the start posvel- the start velocitysize- the size
-
-
Method Details
-
getPrototypes
Load all Enemies.- Returns:
- a set of enemies
- See Also:
-
create
Description copied from class:GameElementStub Factory method that every
GameElementmust implement in order to being able to be instantiated dynamically by the level creation.A startPos must be supplied to position the new GameElement right.
Also, an array of modifiers that the extending
GameElementcan define and use is supplied. These are used make level creation able to determine theGameElementsbehavior. Note: the modifiers are not checked in syntax, so it must be thoroughly checked.- Overrides:
createin classGameElement- Parameters:
startPos- the initial position of the newGameElement.options- optional parameters that may determine additional behavior of theGameElement.- Returns:
- the newly created
GameElement.
-