public class Creature extends CombatEntity implements IMobileEntity
ANY_MESSAGE| Constructor and Description |
|---|
Creature() |
Creature(java.lang.String spritePrefix) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAcceleration()
Gets a value that defines how long it takes the entity to reach the full
velocity (in ms).
|
int |
getDeceleration()
Gets a value that defines how long it takes the entity to stop (in ms).
|
Direction |
getFacingDirection() |
java.awt.geom.Point2D |
getMoveDestination() |
IMovementController |
getMovementController() |
java.lang.String |
getSpritePrefix()
Gets the current sprite prefix of this instance.
|
float |
getTickVelocity()
Gets the entitie's velocity in PIXEL / tick
|
Attribute<java.lang.Float> |
getVelocity()
Gets the entitie's velocity in PIXEL / Second.
|
boolean |
isIdle()
Checks if is idle.
|
void |
setAcceleration(int acceleration) |
void |
setDeceleration(int deceleration) |
void |
setFacingDirection(Direction facingDirection) |
void |
setLocation(java.awt.geom.Point2D position)
Sets the map location.
|
void |
setMoveDestination(java.awt.geom.Point2D dest) |
void |
setSpritePrefix(java.lang.String spritePrefix) |
void |
setTurnOnMove(boolean turn) |
java.lang.String |
toString() |
boolean |
turnOnMove() |
addCombatEntityListener, addDeathListener, addHitListener, die, getAppliedEffects, getHitBox, getHitPoints, getTarget, getTeam, hit, hit, isDead, isFriendly, isIndestructible, isNeutral, removeCombatEntityListener, removeDeathListener, removeHitListener, resurrect, setIndestructible, setTarget, setTeam, wasHitcanCollideWith, getCollisionBox, getCollisionBox, getCollisionBox, getCollisionBoxAlign, getCollisionBoxCenter, getCollisionBoxHeight, getCollisionBoxValign, getCollisionBoxWidth, hasCollision, setCollision, setCollisionBoxAlign, setCollisionBoxHeight, setCollisionBoxValign, setCollisionBoxWidth, setHeight, setSize, setWidthaddController, addListener, addMessageListener, addMessageListener, addTag, addTransformListener, attachControllers, detachControllers, getAngle, getAnimationController, getBehaviorController, getBoundingBox, getCenter, getController, getControllers, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, loaded, removed, removeListener, removeMessageListener, removeTag, removeTransformListener, sendMessage, setAngle, setController, setLocation, setMapId, setName, setProperties, setRenderType, setX, setYclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetAnglecanCollideWith, getCollisionBox, getCollisionBox, getCollisionBoxAlign, getCollisionBoxCenter, getCollisionBoxHeight, getCollisionBoxValign, getCollisionBoxWidth, hasCollision, setCollision, setCollisionBoxAlign, setCollisionBoxHeight, setCollisionBoxValign, setCollisionBoxWidthaddController, addListener, addMessageListener, addMessageListener, addTag, addTransformListener, attachControllers, detachControllers, getAngle, getAnimationController, getBehaviorController, getBoundingBox, getCenter, getController, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, loaded, removed, removeListener, removeMessageListener, removeTag, removeTransformListener, sendMessage, setController, setHeight, setLocation, setMapId, setName, setRenderType, setSize, setWidth, setX, setYpublic Creature()
public Creature(java.lang.String spritePrefix)
public int getAcceleration()
IMobileEntitygetAcceleration in interface IMobileEntitypublic int getDeceleration()
IMobileEntitygetDeceleration in interface IMobileEntitypublic Direction getFacingDirection()
public java.awt.geom.Point2D getMoveDestination()
getMoveDestination in interface IMobileEntitypublic IMovementController getMovementController()
getMovementController in interface IMobileEntitypublic java.lang.String getSpritePrefix()
CreatureAnimationController to determine the animation that it
should play.public float getTickVelocity()
IMobileEntitygetTickVelocity in interface IMobileEntitypublic Attribute<java.lang.Float> getVelocity()
IMobileEntitygetVelocity in interface IMobileEntitypublic boolean isIdle()
public void setAcceleration(int acceleration)
setAcceleration in interface IMobileEntitypublic void setDeceleration(int deceleration)
setDeceleration in interface IMobileEntitypublic void setFacingDirection(Direction facingDirection)
public void setLocation(java.awt.geom.Point2D position)
EntitysetLocation in interface IEntitysetLocation in class CollisionEntityposition - the new map locationpublic void setMoveDestination(java.awt.geom.Point2D dest)
setMoveDestination in interface IMobileEntitypublic void setTurnOnMove(boolean turn)
setTurnOnMove in interface IMobileEntitypublic void setSpritePrefix(java.lang.String spritePrefix)
public boolean turnOnMove()
turnOnMove in interface IMobileEntity