Class AnimatedObject

java.lang.Object
  |
  +--AnimatedObject
All Implemented Interfaces:
Animatable, Paintable
Direct Known Subclasses:
Boid, Flock

public abstract class AnimatedObject
extends java.lang.Object
implements Animatable

Object that knows how to animate itself, but not paint itself.


Field Summary
private  java.util.Vector myBehaviors
           
 
Constructor Summary
AnimatedObject()
          Create an inanimate object :)
 
Method Summary
 void addBehavior(Behavior toAdd)
          Start given behavior by adding it to object.
 void animate()
          Animate by applying all behaviors.
 void clear()
          Effectively stop object by removing all behaviors.
 void removeBehavior(Behavior toRemove)
          Stop given behavior by removing from object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface Paintable
paint
 

Field Detail

myBehaviors

private java.util.Vector myBehaviors
Constructor Detail

AnimatedObject

public AnimatedObject()
Create an inanimate object :)
Method Detail

addBehavior

public void addBehavior(Behavior toAdd)
Start given behavior by adding it to object.

removeBehavior

public void removeBehavior(Behavior toRemove)
Stop given behavior by removing from object.

clear

public void clear()
Effectively stop object by removing all behaviors.

animate

public void animate()
Animate by applying all behaviors.
Specified by:
animate in interface Animatable