|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvisual.dynamic.described.AbstractSprite
visual.dynamic.described.RuleBasedSprite
public abstract class RuleBasedSprite
An abstract rule-based Sprite Note: Concrete descendents must implement the handleTick() method
| Field Summary | |
|---|---|
protected java.util.ArrayList<Sprite> |
antagonists
|
protected TransformableContent |
content
|
| Fields inherited from class visual.dynamic.described.AbstractSprite |
|---|
angle, rotationPoint, rotationX, rotationY, scaleX, scaleY, visible, x, y |
| Constructor Summary | |
|---|---|
RuleBasedSprite(TransformableContent content)
Explicit Value Constructor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class visual.dynamic.described.AbstractSprite |
|---|
getBounds2D, getBounds2D, intersects, reinitialize, render, setLocation, setRotation, setRotation, setScale, setScale, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<Sprite> antagonists
protected TransformableContent content
| Constructor Detail |
|---|
public RuleBasedSprite(TransformableContent content)
content - The static visual content| Method Detail |
|---|
public void addAntagonist(Sprite antagonist)
antagonist - The "antagonist" Sprite to addpublic TransformableContent getContent()
getContent in class AbstractSpritepublic 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
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||