Class Index | File Index

Classes


Class CAAT.Behavior.ContainerBehavior


Extends CAAT.Behavior.BaseBehavior.

Defined in: ContainerBehavior.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
A collection of behaviors.
Fields borrowed from class CAAT.Behavior.BaseBehavior:
actor, behaviorDuration, behaviorStartTime, cycleBehavior, discardable, doValueApplication, id, interpolator, isRelative, lifecycleListenerList, solved, status, timeOffset
Method Summary
Method Attributes Method Name and Description
<private>  
__init(conforming)
 
addBehavior(behavior)
Add a new behavior to the container.
 
apply(time, actor)
Applies every contained Behaviors.
 
behaviorApplied(behavior, scenetime, time, actor, value)
 
behaviorExpired(behavior, time, actor)
This method is the observer implementation for every contained behavior.
 
calculateKeyFrameData(referenceTime, prefix)
 
calculateKeyFramesData(prefix, name, keyframessize, anchorX, anchorY)
 
Proportionally change this container duration to its children.
 
Get a behavior by mathing its id.
 
getKeyFrameDataValues(referenceTime)
 
parse(obj)
 
setCycle(cycle, recurse)
 
setDelayTime(start, duration)
 
setExpired(actor, time)
Expire this behavior and the children applied at the parameter time.
 
setForTime(time{number})
Implementation method of the behavior.
 
setFrameTime(start, duration)
Methods borrowed from class CAAT.Behavior.BaseBehavior:
addListener, emptyListenerList, fireBehaviorAppliedEvent, fireBehaviorExpiredEvent, fireBehaviorStartedEvent, getDuration, getPropertyName, getStartTime, initialize, isBehaviorInTime, isCycle, normalizeTime, setDefaultInterpolator, setId, setInterpolator, setOutOfFrameTime, setPingPong, setRelative, setRelativeValues, setStatus, setTimeOffset, setValueApplication
Class Detail
CAAT.Behavior.ContainerBehavior()
Field Detail
behaviors
A collection of behaviors.
Method Detail
<private> __init(conforming)
Parameters:
conforming
{bool=} conform this behavior duration to that of its children.

addBehavior(behavior)
Add a new behavior to the container.
Parameters:
behavior
{CAAT.Behavior.BaseBehavior}

apply(time, actor)
Applies every contained Behaviors. The application time the contained behaviors will receive will be ContainerBehavior related and not the received time.
Parameters:
time
an integer indicating the time to apply the contained behaviors at.
actor
a CAAT.Foundation.Actor instance indicating the actor to apply the behaviors for.

behaviorApplied(behavior, scenetime, time, actor, value)
Parameters:
behavior
scenetime
time
actor
value

behaviorExpired(behavior, time, actor)
This method is the observer implementation for every contained behavior. If a container is Cycle=true, won't allow its contained behaviors to be expired.
Parameters:
behavior
a CAAT.Behavior.BaseBehavior instance which has been expired.
time
an integer indicating the time at which has become expired.
actor
a CAAT.Foundation.Actor the expired behavior is being applied to.

calculateKeyFrameData(referenceTime, prefix)
Parameters:
referenceTime
prefix

calculateKeyFramesData(prefix, name, keyframessize, anchorX, anchorY)
Parameters:
prefix
name
keyframessize
anchorX
anchorY

conformToDuration(duration)
Proportionally change this container duration to its children.
Parameters:
duration
{number} new duration in ms.
Returns:
this;

getBehaviorById(id)
Get a behavior by mathing its id.
Parameters:
id
{object}

getKeyFrameDataValues(referenceTime)
Parameters:
referenceTime

parse(obj)
Parameters:
obj

setCycle(cycle, recurse)
Parameters:
cycle
recurse

setDelayTime(start, duration)
Parameters:
start
duration

{*} setExpired(actor, time)
Expire this behavior and the children applied at the parameter time.
Parameters:
actor
{CAAT.Foundation.Actor}
time
{number}
Returns:
{*}

setForTime(time{number})
Implementation method of the behavior. Just call implementation method for its contained behaviors.
Parameters:
time{number}
an integer indicating the time the behavior is being applied at.
actor{CAAT.Foundation.Actor}
an actor the behavior is being applied to.

setFrameTime(start, duration)
Parameters:
start
duration

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:15 GMT-0700 (PDT)