Class EndTrigger
- All Implemented Interfaces:
org.fuchss.configuration.Configurable
,Collidable
-
Nested Class Summary
Nested classes/interfaces inherited from interface rekit.logic.Collidable
Collidable.Optional
-
Field Summary
Fields inherited from class rekit.logic.gameelements.GameElement
deleteMe, deltaTime, team, visible
-
Method Summary
Modifier and TypeMethodDescriptionStub Factory method that everyGameElement
must implement in order to being able to be instantiated dynamically by the level creation.void
destroy()
Method that, upon call, signals that thisGameElement
is supposed to be deleted in the next logicLoop of theIScene
.static Inanimate
Get the prototype of the EndTrigger.getZHint()
void
Template method that will be called periodically after being added to aIScene
.void
Template method that will be called periodically after being added to aIScene
.void
perform()
Perform trigger-action.Methods inherited from class rekit.logic.gameelements.inanimate.InanimateTrigger
createTrigger, reactToCollision
Methods inherited from class rekit.logic.gameelements.inanimate.Inanimate
collidedWithSolid, getLives
Methods inherited from class rekit.logic.gameelements.GameElement
checkCollision, getDeleteMe, getFrame, getPos, getScene, getSize, getTeam, getVel, getZ, init, isAddableToGroup, isVisible, killBoost, render, setPos, setScene, setSize, setVel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface rekit.logic.Collidable
addDamage
-
Method Details
-
logicLoop
public void logicLoop()Description copied from class:GameElement
Template method that will be called periodically after being added to a
IScene
.Should be overwritten in sub classes for implementing custom logic, physics emulation, time-based actions, ...
- Overrides:
logicLoop
in classGameElement
-
internalRender
Description copied from class:GameElement
Template method that will be called periodically after being added to a
IScene
. Must be as performant as possible to keep the FPS low, since it will be called in every render-loop.Should be overwritten in sub classes for custom visualization using the
GameGrid
.- Overrides:
internalRender
in classInanimateTrigger
- Parameters:
f
- theGameGrid
that represents the games field and supplies primitive drawing operations.
-
perform
public void perform()Description copied from class:InanimateTrigger
Perform trigger-action.- Overrides:
perform
in classInanimateTrigger
-
create
Description copied from class:GameElement
Stub Factory method that every
GameElement
must 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
GameElement
can define and use is supplied. These are used make level creation able to determine theGameElements
behavior. Note: the modifiers are not checked in syntax, so it must be thoroughly checked.- Overrides:
create
in classInanimate
- Parameters:
startPos
- the initial position of the newGameElement
.options
- optional parameters that may determine additional behavior of theGameElement
.- Returns:
- the newly created
GameElement
.
-
getPrototype
Get the prototype of the EndTrigger.- Returns:
- the prototype
-
destroy
public void destroy()Description copied from class:GameElement
Method that, upon call, signals that this
GameElement
is supposed to be deleted in the next logicLoop of theIScene
.Note: The underlying
GameElement
might go through several collisions and be rendered multiple times before it is actually deleted.- Overrides:
destroy
in classGameElement
-
getZHint
Description copied from class:GameElement
- Overrides:
getZHint
in classGameElement
- Returns:
null
if no hint, otherwise the expected position
-