All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class improv.actor.behavior.Behavior

java.lang.Object
   |
   +----improv.actor.behavior.Behavior

public abstract class Behavior
extends Object
implements PropertyContainer
This is the superclass of State and Sequence, and defines a set of methods for getting and setting vatiables common to both classes.

See Also:
State, Sequence

Constructor Index

 o Behavior()

Method Index

 o addProperty(ImprovProperty)
Used to add a property to the behavior.
 o elapsedTimeSinceClockStart()
 o elapsedTimeSinceStart()
 o getClockStart()
 o getDuration()
 o getLayer()
 o getName()
 o getProperty(String)
 o getStartTime()
 o getTimeScale()
 o getTimeScale(double)
 o getWeight()
 o hasLocalClock()
 o isMomentary()
 o setCurrentDuration(double)
This is used to temporarily override the value of the behaviors duration field.
 o setCurrentMomentary(boolean)
This is used to temporarily override the value of the behavior's momentary flag.
 o setDuration(double)
 o setLocalClock(boolean)
 o setMomentary(boolean)
Sets the value of the momentary flag.
 o setName(String)
 o setWeight(double)

Constructors

 o Behavior
 public Behavior()

Methods

 o getName
 public final String getName()
Returns:
the name of the Behavior
 o setName
 public final void setName(String name)
Parameters:
name - the name of the behavior
 o getLayer
 public Layer getLayer()
Returns:
this Behavior's Layer.
 o hasLocalClock
 public final boolean hasLocalClock()
 o setLocalClock
 public final void setLocalClock(boolean b)
Parameters:
localClock - the value of the local clock flag.
 o getStartTime
 public final double getStartTime()
Returns:
the start time in seconds for the behavior.
 o getClockStart
 public final double getClockStart()
Returns:
the start time in seconds for the behavior clock. If the Behavior is running on a local clock then this will be the same as the start time for the behavior, otherwise this is start time of the last behavior in this layer with a local clock.
 o elapsedTimeSinceStart
 public final double elapsedTimeSinceStart()
Returns:
the elapsed time in seconds since the start of the behavior.
 o elapsedTimeSinceClockStart
 public final double elapsedTimeSinceClockStart()
Returns:
the elapsed time in seconds since the start of the behavior clock.
 o getWeight
 public final double getWeight()
Returns:
the current weight of the behavior
 o setWeight
 public final void setWeight(double weight)
Parameters:
weight - the current weight of the behavior
 o getDuration
 public final double getDuration()
Returns:
the current duration of the behavior
 o setDuration
 public final void setDuration(double duration)
Parameters:
duration - the current duration of the behavior
 o setCurrentDuration
 public final void setCurrentDuration(double duration)
This is used to temporarily override the value of the behaviors duration field. This temporary value lasts until this behavior is no longer active and then @return to the value set using the setDuration() method.

 o isMomentary
 public final boolean isMomentary()
Returns:
the value of the momentary flag.
 o setMomentary
 public final void setMomentary(boolean momentary)
Sets the value of the momentary flag. The momentary flag is used for behaviors that temporarily override other behaviors. When this flag is set to true, the behavior active immediately prior to this behavior will be reactivated at the end of this behavior's duration.

 o setCurrentMomentary
 public final void setCurrentMomentary(boolean b)
This is used to temporarily override the value of the behavior's momentary flag. This temporary value lasts until this behavior is no longer active and then @return to the value set using the setMomentary() method.

 o getTimeScale
 public final double getTimeScale(double time)
Returns:
the current time scale, which is either the value of the time scale field or the current value returned by the time scale curve.
 o getTimeScale
 public final double getTimeScale()
Returns:
the current time scale, which is either the value of the time scale field or the current value returned by the time scale curve at time 0.
 o getProperty
 public final ImprovProperty getProperty(String propertyName)
Returns:
the behavior's property given the property name. @return null if no property exists by this name.
 o addProperty
 public final void addProperty(ImprovProperty i)
Used to add a property to the behavior. Will override any previous property with the same name.


All Packages  Class Hierarchy  This Package  Previous  Next  Index