public abstract class RenderableObject
extends java.lang.Object
Animation
Modifier and Type | Field and Description |
---|---|
private Animation |
animation
The active animation for this object.
|
Constructor and Description |
---|
RenderableObject() |
Modifier and Type | Method and Description |
---|---|
Animation |
getAnimation()
Gets the animation for this object.
|
boolean |
hasAnimation()
Checks if this convex object has an active animation.
|
abstract void |
render(java.awt.Graphics2D g)
Renders this object.
|
void |
renderOrAnimate(java.awt.Graphics2D g)
Renders this object or runs its animation
if it has one set.
|
boolean |
runAnimation(java.awt.Graphics2D g)
Renders the animation for this convex object
using the given graphics instance.
|
void |
setAnimation(Animation animation)
Sets the active animation for this convex object.
|
private transient Animation animation
public Animation getAnimation()
public boolean hasAnimation()
public void setAnimation(Animation animation)
animation
- The new active animation.public boolean runAnimation(java.awt.Graphics2D g)
g
- The graphics instance to use.public void renderOrAnimate(java.awt.Graphics2D g)
g
- The graphics context to use.public abstract void render(java.awt.Graphics2D g)
g
- The graphics context to use.