Class Prop
java.lang.Object
de.gurkenlabs.litiengine.entities.Entity
de.gurkenlabs.litiengine.entities.CollisionEntity
de.gurkenlabs.litiengine.entities.CombatEntity
de.gurkenlabs.litiengine.entities.Prop
- All Implemented Interfaces:
EntityRenderedListener
,EntityRenderListener
,ICollisionEntity
,ICombatEntity
,IEntity
,Tweenable
,java.util.EventListener
public class Prop
extends CombatEntity
Field Summary
Constructor Summary
Constructors Constructor Description Prop(double x, double y, java.lang.String spritesheetName)
Instantiates a newProp
entity.Prop(double x, double y, java.lang.String spritesheetName, Material material)
Instantiates a newProp
entity.Prop(java.awt.geom.Point2D location, java.lang.String spritesheetName)
Instantiates a newProp
entity.Prop(java.awt.geom.Point2D location, java.lang.String spritesheetName, Material material)
Instantiates a newProp
entity.Prop(java.lang.String spritesheetName)
Instantiates a newProp
entity.Method Summary
Modifier and Type Method Description protected IEntityAnimationController<?>
createAnimationController()
boolean
flipHorizontally()
boolean
flipVertically()
Material
getMaterial()
Rotation
getSpriteRotation()
java.lang.String
getSpritesheetName()
PropState
getState()
Gets the state.boolean
isAddShadow()
boolean
isDead()
Checks if is dead.boolean
isScaling()
void
setAddShadow(boolean addShadow)
void
setFlipHorizontally(boolean flipHorizontally)
void
setFlipVertically(boolean flipVertically)
void
setMaterial(Material material)
void
setScaling(boolean scaling)
void
setSpriteRotation(Rotation spriteRotation)
void
setSpritesheetName(java.lang.String spriteName)
java.lang.String
toString()
Methods inherited from class de.gurkenlabs.litiengine.entities.CombatEntity
addCombatEntityListener, die, getAppliedEffects, getHitBox, getHitPoints, getTarget, getTeam, getTweenValues, hit, hit, isFriendly, isIndestructible, isNeutral, onDeath, onHit, onResurrect, removeCombatEntityListener, removeListener, removeListener, removeListener, resurrect, setIndestructible, setTarget, setTeam, setTweenValues, wasHit
Methods inherited from class de.gurkenlabs.litiengine.entities.CollisionEntity
canCollideWith, fireCollisionEvent, getCollisionBox, getCollisionBox, getCollisionBox, getCollisionBoxAlign, getCollisionBoxCenter, getCollisionBoxHeight, getCollisionBoxValign, getCollisionBoxWidth, getCollisionType, hasCollision, onCollision, refreshCollisionBox, removeCollisionListener, setCollision, setCollisionBoxAlign, setCollisionBoxHeight, setCollisionBoxValign, setCollisionBoxWidth, setCollisionType, setHeight, setLocation, setSize, setWidth
Methods inherited from class de.gurkenlabs.litiengine.entities.Entity
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, canRender, detachControllers, getAngle, getBoundingBox, getCenter, getController, getControllers, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, isVisible, loaded, onMessage, onMessage, onRendered, perform, register, removed, removeListener, removeListener, removeListener, removeListener, removeListener, removeTag, rendered, rendering, renderWithLayer, sendMessage, setAngle, setController, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, setVisible, setX, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.gurkenlabs.litiengine.entities.ICollisionEntity
canCollideWith, fireCollisionEvent, getCollisionBox, getCollisionBox, getCollisionBoxAlign, getCollisionBoxCenter, getCollisionBoxHeight, getCollisionBoxValign, getCollisionBoxWidth, getCollisionType, hasCollision, onCollision, removeCollisionListener, setCollision, setCollisionBoxAlign, setCollisionBoxHeight, setCollisionBoxValign, setCollisionBoxWidth, setCollisionType
Methods inherited from interface de.gurkenlabs.litiengine.entities.IEntity
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, detachControllers, getAngle, getBoundingBox, getCenter, getController, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, isVisible, loaded, onMessage, onMessage, onRendered, perform, register, removed, removeListener, removeListener, removeListener, removeListener, removeListener, removeTag, renderWithLayer, sendMessage, setAngle, setController, setHeight, setLocation, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, setSize, setVisible, setWidth, setX, setY
Constructor Details
Prop
public Prop(java.lang.String spritesheetName)Instantiates a newProp
entity.- Parameters:
spritesheetName
- The spritesheet name of this prop.
Prop
public Prop(double x, double y, java.lang.String spritesheetName)Instantiates a newProp
entity.- Parameters:
x
- The x-coordinate of this prop.y
- The y-coordinate of this prop.spritesheetName
- The spritesheet name of this prop.
Prop
Instantiates a newProp
entity.- Parameters:
x
- The x-coordinate of this prop.y
- The y-coordinate of this prop.spritesheetName
- The spritesheet name of this prop.material
- The material of this prop.
Prop
public Prop(java.awt.geom.Point2D location, java.lang.String spritesheetName)Instantiates a newProp
entity.- Parameters:
location
- The location of this prop.spritesheetName
- The spritesheet name of this prop.
Prop
Instantiates a newProp
entity.- Parameters:
location
- The location of this prop.spritesheetName
- The spritesheet name of this prop.material
- The material of this prop.
Method Details
getMaterial
getSpritesheetName
public java.lang.String getSpritesheetName()getState
Gets the state.- Returns:
- the state
isAddShadow
public boolean isAddShadow()isScaling
public boolean isScaling()flipHorizontally
public boolean flipHorizontally()flipVertically
public boolean flipVertically()getSpriteRotation
setMaterial
setSpritesheetName
public void setSpritesheetName(java.lang.String spriteName)setAddShadow
public void setAddShadow(boolean addShadow)setScaling
public void setScaling(boolean scaling)isDead
public boolean isDead()Description copied from class:CombatEntity
Checks if is dead.- Specified by:
isDead
in interfaceICombatEntity
- Overrides:
isDead
in classCombatEntity
- Returns:
- true, if is dead
setSpriteRotation
setFlipHorizontally
public void setFlipHorizontally(boolean flipHorizontally)setFlipVertically
public void setFlipVertically(boolean flipVertically)toString
public java.lang.String toString()createAnimationController