Class Particle
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.Renderable
-
- com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
-
- com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
-
- com.bombinggames.wurfelengine.core.gameobjects.MovableEntity
-
- com.bombinggames.wurfelengine.core.gameobjects.Particle
-
public class Particle extends MovableEntity
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
colissionRadius
-
Fields inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
sprite
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Deletes the object from the map and every other container.float
getLivingTime()
the amount of time the object lives maximum.float
getPercentageOfLife()
ParticleType
getType()
void
init(float maxtime)
void
setColor(com.badlogic.gdx.graphics.Color color)
Give the object a tint.void
setTTL(float time)
Time to live for each particle.void
setType(ParticleType type)
void
update(float dt)
Updates the character.-
Methods inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractEntity
addComponent, collidesWith, getCollidingEntities, getCollidingEntities, getComponents, getComponents, getCoord, getCoveredBlocks, getDimensionZ, getHealth, getLightlevelB, getLightlevelG, getLightlevelR, getMass, getName, getPoint, getPosition, getRegisteredEntities, getSpriteCategory, getSpriteId, getSpriteValue, hasPosition, heal, isIndestructible, isInMemoryArea, isMarkedDS, isSavedPersistent, markAsVisitedDS, registerEngineEntities, registerEntity, removeComponent, removeFromMap, requestChunk, setDamageSounds, setDimensionZ, setHealth, setIndestructible, setLightlevel, setMass, setName, setPosition, setPosition, setSavePersistent, setSpriteCategory, setSpriteId, setSpriteValue, setUseRawDelta, shouldBeDisposed, takeDamage, useRawDelta
-
Methods inherited from class com.bombinggames.wurfelengine.core.gameobjects.AbstractGameObject
getColor, getDepth, getPixmap, getRotation, getScaling, getSprite, getSprite, getSpritesheet, getSpritesheetPath, getTextureDiffuse, getTextureNormal, isHidden, loadSheet, render, render, setCustomSpritesheet, setHidden, setRotation, setScaling, shouldBeRendered, staticDispose, updateSpriteCache
-
Methods inherited from class com.bombinggames.wurfelengine.core.gameobjects.MovableEntity
addMovement, addMovement, addMovement, addToHor, collidesWithWorld, getAiming, getFriction, getMovement, getMovementHor, getOrientation, getSpeed, getSpeedHor, handleMessage, isColiding, isFloating, isInLiquid, isOnCeil, isOnGround, jump, jump, pauseMovementAnimation, playMovementAnimation, setColiding, setContinuousWalkingAnimation, setFallingSound, setFloating, setFriction, setHorMovement, setJumpingSound, setMovement, setMovement, setOrientation, setRunningSound, setSpeedHorizontal, setSpeedIncludingZ, setStepSound1Grass, setWalkingAnimationCycling, setWalkingStepMode, setWaterSound, spawn, step, updateSprite
-
-
-
-
Method Detail
-
init
public void init(float maxtime)
- Parameters:
maxtime
-
-
setType
public void setType(ParticleType type)
- Parameters:
type
-
-
getType
public ParticleType getType()
- Returns:
-
setColor
public void setColor(com.badlogic.gdx.graphics.Color color)
Description copied from class:AbstractGameObject
Give the object a tint. The default brightness is RGBA 0x808080FF so you can make it brighter and darker by modifying R, G and B.- Overrides:
setColor
in classAbstractGameObject
- Parameters:
color
- refence is kept
-
setTTL
public void setTTL(float time)
Time to live for each particle. Resets timer.- Parameters:
time
- in ms
-
update
public void update(float dt)
Description copied from class:MovableEntity
Updates the character. Applies gravitation.- Overrides:
update
in classMovableEntity
- Parameters:
dt
- time since last update in ms
-
getPercentageOfLife
public float getPercentageOfLife()
- Returns:
-
getLivingTime
public float getLivingTime()
the amount of time the object lives maximum.- Returns:
-
dispose
public void dispose()
Description copied from class:AbstractEntity
Deletes the object from the map and every other container. The opposite to spawn() but also sets a flag to remove it completely.- Overrides:
dispose
in classMovableEntity
- See Also:
AbstractEntity.shouldBeDisposed()
,AbstractEntity.removeFromMap()
-
-