Class DefaultCoin
java.lang.Object
rekit.logic.gameelements.GameElement
rekit.logic.gameelements.entities.Entity
rekit.logic.gameelements.type.Pickup
rekit.logic.gameelements.type.Coin
rekit.logic.gameelements.entities.pickups.DefaultCoin
- All Implemented Interfaces:
Collidable
This class represents default coins.
-
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
ConstructorsModifierConstructorDescriptionPrototype constructor.protectedDefaultCoin(Vec startPos) Constructor with position. -
Method Summary
Modifier and TypeMethodDescriptionStub Factory method that everyGameElementmust implement in order to being able to be instantiated dynamically by the level creation.protected RGBAColorgetColor()Get the main color of the coin.protected RGBAColorGet a darker version of the colorCoin.getColor()for the edge of the coin.protected intgetValue()Get the value of the coin.Methods inherited from class rekit.logic.gameelements.type.Coin
getPrototypes, innerLogicLoop, internalRender, performMethods inherited from class rekit.logic.gameelements.type.Pickup
reactToCollisionMethods inherited from class rekit.logic.gameelements.entities.Entity
addDamage, collidedWithSolid, getLives, isVisible, logicLoop, setLivesMethods inherited from class rekit.logic.gameelements.GameElement
checkCollision, destroy, getDeleteMe, getFrame, getPos, getScene, getSize, getTeam, getVel, getZ, getZHint, init, isAddableToGroup, killBoost, render, setPos, setScene, setSize, setVel
-
Constructor Details
-
DefaultCoin
public DefaultCoin()Prototype constructor. -
DefaultCoin
Constructor with position.- Parameters:
startPos- the position.
-
-
Method Details
-
getColor
Description copied from class:CoinGet the main color of the coin. -
getDarkerColor
Description copied from class:CoinGet a darker version of the colorCoin.getColor()for the edge of the coin.- Specified by:
getDarkerColorin classCoin- Returns:
- the darker color
-
getValue
protected int getValue()Description copied from class:CoinGet the value of the coin. -
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.- Specified by:
createin classCoin- Parameters:
startPos- the initial position of the newGameElement.options- optional parameters that may determine additional behavior of theGameElement.- Returns:
- the newly created
GameElement.
-