Constructor and Description |
---|
ObjectAvatar(SimpleAnim anim)
Object avatar constructor(with simple animation as texture)
|
ObjectAvatar(Sprite texture)
Object avatar constructor(with simple sprite as texture)
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEffect(SimpleAnim effect,
boolean loop)
Adds animated effect to object effects
|
void |
draw(float size)
Draws avatar on current avatar texture position
|
void |
draw(float x,
float y,
boolean scaledPos)
Draws avatar
|
boolean |
isMouseOver()
Checks if mouse is over avatar texture
|
boolean |
removeEffect(SimpleAnim effect)
Removes specified animated effect from object effects list
|
void |
setPosition(Position pos)
Sets specified position as avatar texture position
|
void |
update(int delta)
Updates avatar
|
public ObjectAvatar(Sprite texture)
texture
- Spritepublic ObjectAvatar(SimpleAnim anim)
anim
- Simple animationpublic void draw(float x, float y, boolean scaledPos)
x
- Position on x-axisy
- Position on y-axisscaledPos
- True if position should be scaled to current resolution, false otherwisepublic void update(int delta)
delta
- Time from last updatepublic void draw(float size)
size
- Desired size of avatar texturepublic void setPosition(Position pos)
pos
- Position to setpublic boolean isMouseOver()
public boolean addEffect(SimpleAnim effect, boolean loop)
Effective
public boolean removeEffect(SimpleAnim effect)
Effective
removeEffect
in interface Effective
effect
- Simple animation to remove