Class TextParticle
java.lang.Object
rekit.logic.gameelements.GameElement
rekit.logic.gameelements.particles.Particle
rekit.logic.gameelements.particles.TextParticle
- All Implemented Interfaces:
Collidable
Particle that shows a text, that can be specified via
setText(String)- Author:
- Angelo Aracri
-
Nested Class Summary
Nested classes/interfaces inherited from interface rekit.logic.Collidable
Collidable.Optional -
Field Summary
Fields inherited from class rekit.logic.gameelements.particles.Particle
currentColFields inherited from class rekit.logic.gameelements.GameElement
deleteMe, deltaTime, team, visible -
Constructor Summary
ConstructorsConstructorDescriptionCreate a TextParticle with standard font.TextParticle(int fontSize) Create a TextParticle and set font size. -
Method Summary
Methods inherited from class rekit.logic.gameelements.particles.Particle
capColor, logicLoop, setPropertiesMethods inherited from class rekit.logic.gameelements.GameElement
checkCollision, create, destroy, getDeleteMe, getFrame, getPos, getScene, getSize, getTeam, getVel, getZ, getZHint, init, isAddableToGroup, isVisible, killBoost, reactToCollision, render, setPos, setScene, setSize, setVelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rekit.logic.Collidable
addDamage, collidedWithSolid, getLives
-
Constructor Details
-
TextParticle
public TextParticle()Create a TextParticle with standard font. -
TextParticle
public TextParticle(int fontSize) Create a TextParticle and set font size.- Parameters:
fontSize- the font size
-
-
Method Details
-
setText
Setter for the internally usedtextthat will be rendered.- Parameters:
text- the text.
-
setSize
public void setSize(int size) Setter for the internally used font size.- Parameters:
size- the font size.
-
internalRender
Description copied from class:GameElementTemplate 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:
internalRenderin classParticle- Parameters:
f- theGameGridthat represents the games field and supplies primitive drawing operations.
-
create
Description copied from class:ParticleCreate a particle.
-