Class EntityExpression
- java.lang.Object
-
- net.egartley.beyondorigins.core.abstracts.Renderable
-
- net.egartley.beyondorigins.core.abstracts.Entity
-
- net.egartley.beyondorigins.core.abstracts.AnimatedEntity
-
- net.egartley.beyondorigins.entities.EntityExpression
-
- All Implemented Interfaces:
Tickable
public class EntityExpression extends AnimatedEntity
An image that appears above an entity to convey an emotion
-
-
Field Summary
Fields Modifier and Type Field Description static byte
ANGER
static short
ANIMATIONSPEED_FAST
static short
ANIMATIONSPEED_NORMAL
static short
ANIMATIONSPEED_SLOW
static byte
ATTENTION
static byte
CONFUSION
static byte
DISGUST
static byte
HAPPINESS
static byte
HEART
static byte
INTEREST
boolean
isVisible
static byte
SADDNESS
static byte
SURPRISE
Entity
target
static byte
THINKING
byte
type
-
Fields inherited from class net.egartley.beyondorigins.core.abstracts.AnimatedEntity
animation, animations
-
Fields inherited from class net.egartley.beyondorigins.core.abstracts.Entity
boundaries, canCollide, defaultBoundary, deltaX, deltaY, DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, firstLayer, health, image, interactions, inventory, isAllowedToMoveDownwards, isAllowedToMoveLeftwards, isAllowedToMoveRightwards, isAllowedToMoveUpwards, isAnimated, isCollided, isDualRendered, isMovingDownwards, isMovingLeftwards, isMovingRightwards, isMovingUpwards, isSectorSpecific, isTraversable, lastCollision, lastCollisionEvent, maximumHealth, name, secondLayer, sheets, speed, sprite, sprites, uuid
-
-
Constructor Summary
Constructors Constructor Description EntityExpression(byte type, Entity target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.newdawn.slick.Animation
getTemplateAnimation()
private SpriteSheet
getTemplateSpriteSheet(byte type)
void
render(org.newdawn.slick.Graphics graphics)
void
setAnimations()
Sets the entity's animationsprotected void
setBoundaries()
Sets the entity's boundariesvoid
setCollisions()
Sets the entity's collisionsprotected void
setInteractions()
Sets the entity's interactionsvoid
tick()
Ticks boundaries and interactions-
Methods inherited from class net.egartley.beyondorigins.core.abstracts.AnimatedEntity
switchAnimation
-
Methods inherited from class net.egartley.beyondorigins.core.abstracts.Entity
allowAllMovement, drawDebug, drawFirstLayer, drawSecondLayer, move, onMove, onSectorEnter, onSectorLeave, setPosition, setSprite, setSprite, setSprites, toString, x, x, y, y
-
Methods inherited from class net.egartley.beyondorigins.core.abstracts.Renderable
x, y
-
-
-
-
Field Detail
-
INTEREST
public static final byte INTEREST
- See Also:
- Constant Field Values
-
DISGUST
public static final byte DISGUST
- See Also:
- Constant Field Values
-
HAPPINESS
public static final byte HAPPINESS
- See Also:
- Constant Field Values
-
ANGER
public static final byte ANGER
- See Also:
- Constant Field Values
-
SADDNESS
public static final byte SADDNESS
- See Also:
- Constant Field Values
-
CONFUSION
public static final byte CONFUSION
- See Also:
- Constant Field Values
-
THINKING
public static final byte THINKING
- See Also:
- Constant Field Values
-
SURPRISE
public static final byte SURPRISE
- See Also:
- Constant Field Values
-
ATTENTION
public static final byte ATTENTION
- See Also:
- Constant Field Values
-
HEART
public static final byte HEART
- See Also:
- Constant Field Values
-
ANIMATIONSPEED_NORMAL
public static final short ANIMATIONSPEED_NORMAL
- See Also:
- Constant Field Values
-
ANIMATIONSPEED_FAST
public static final short ANIMATIONSPEED_FAST
- See Also:
- Constant Field Values
-
ANIMATIONSPEED_SLOW
public static final short ANIMATIONSPEED_SLOW
- See Also:
- Constant Field Values
-
type
public byte type
-
isVisible
public boolean isVisible
-
target
public Entity target
-
-
Constructor Detail
-
EntityExpression
public EntityExpression(byte type, Entity target)
-
-
Method Detail
-
getTemplateSpriteSheet
private SpriteSheet getTemplateSpriteSheet(byte type)
-
getTemplateAnimation
private org.newdawn.slick.Animation getTemplateAnimation()
-
tick
public void tick()
Description copied from class:Entity
Ticks boundaries and interactions- Specified by:
tick
in interfaceTickable
- Overrides:
tick
in classEntity
- See Also:
Entity.boundaries
-
render
public void render(org.newdawn.slick.Graphics graphics)
Description copied from class:Entity
- Overrides:
render
in classAnimatedEntity
-
setAnimations
public void setAnimations()
Description copied from class:AnimatedEntity
Sets the entity's animations- Specified by:
setAnimations
in classAnimatedEntity
- See Also:
AnimatedEntity.animations
-
setBoundaries
protected void setBoundaries()
Description copied from class:Entity
Sets the entity's boundaries- Specified by:
setBoundaries
in classEntity
- See Also:
Entity.boundaries
-
setCollisions
public void setCollisions()
Description copied from class:Entity
Sets the entity's collisions- Specified by:
setCollisions
in classEntity
- See Also:
Entity.boundaries
-
setInteractions
protected void setInteractions()
Description copied from class:Entity
Sets the entity's interactions- Specified by:
setInteractions
in classEntity
- See Also:
Entity.interactions
-
-