public abstract class RuleBasedSprite extends AbstractSprite
| Constructor and Description |
|---|
RuleBasedSprite(TransformableContent content)
Explicit Value Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAntagonist(Sprite antagonist)
Add a "antagonist" Sprite to this Sprite.
|
TransformableContent |
getContent()
Get the visual content associated with this Sprite
(required by Sprite).
|
abstract void |
handleTick(int time)
Handle a tick event (required by MetronomeListener).
|
void |
removeAntagonist(Sprite antagonist)
Remove a "antagonist" Sprite from the collection of
"antagonists" this Sprite is concerned with.
|
getBounds2D, getBounds2D, intersects, render, setLocation, setRotation, setRotation, setScale, setScale, setVisiblepublic RuleBasedSprite(TransformableContent content)
content - The static visual contentpublic void addAntagonist(Sprite antagonist)
antagonist - The "antagonist" Sprite to addpublic TransformableContent getContent()
public abstract void handleTick(int time)
handleTick in interface MetronomeListenerhandleTick in class AbstractSpritetime - The current time (in milliseconds)public void removeAntagonist(Sprite antagonist)
antagonist - The "antagonist" Sprite to remove