Class Index | File Index

Classes


Class CAAT.Behavior.PathBehavior


Extends CAAT.Behavior.BaseBehavior.

Defined in: PathBehavior.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<private>  
Whether to set rotation angle while traversing the path.
<private>  
Autorotation hint.
<private>  
A path to traverse.
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
 
 
calculateKeyFramesData(prefix, name, keyframessize)
 
 
 
parse(obj)
 
Get a point on the path.
 
setAutoRotate(autorotate, autorotateOp)
Sets an actor rotation to be heading from past to current path's point.
 
setForTime(time, actor)
 
 
Set the behavior path.
 
 
 
Set the behavior path.
Methods borrowed from class CAAT.Behavior.BaseBehavior:
__init, addListener, apply, emptyListenerList, fireBehaviorAppliedEvent, fireBehaviorExpiredEvent, fireBehaviorStartedEvent, getDuration, getStartTime, initialize, isBehaviorInTime, isCycle, normalizeTime, setCycle, setDefaultInterpolator, setDelayTime, setExpired, setFrameTime, setId, setInterpolator, setOutOfFrameTime, setPingPong, setRelative, setStatus, setTimeOffset, setValueApplication
Class Detail
CAAT.Behavior.PathBehavior()
Field Detail
<private> autoRotate
Whether to set rotation angle while traversing the path.

<private> autoRotateOp
Autorotation hint.

<private> path
A path to traverse.
Method Detail
calculateKeyFrameData(time)
Parameters:
time

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

getKeyFrameDataValues(time)
Parameters:
time

getPropertyName()

parse(obj)
Parameters:
obj

{object} positionOnTime(time)
Get a point on the path. If the time to get the point at is in behaviors frame time, a point on the path will be returned, otherwise a default {x:-1, y:-1} point will be returned.
Parameters:
time
{number} the time at which the point will be taken from the path.
Returns:
{object} an object of the form {x:float y:float}

setAutoRotate(autorotate, autorotateOp)
Sets an actor rotation to be heading from past to current path's point. Take into account that this will be incompatible with rotation Behaviors since they will set their own rotation configuration.
Parameters:
autorotate
{boolean}
autorotateOp
{CAAT.PathBehavior.autorotate} whether the sprite is drawn heading to the right.
Returns:
this.

setForTime(time, actor)
Parameters:
time
actor

setOpenContour(b)
Parameters:
b

setPath()
Set the behavior path. The path can be any length, and will take behaviorDuration time to be traversed.
Parameters:
{CAAT.Path}

setRelativeValues(x, y)
Parameters:
x
y

setTranslation(tx, ty)
Parameters:
tx
a float with xoffset.
ty
a float with yoffset.
See:
Actor.setPositionAnchor

setValues()
Set the behavior path. The path can be any length, and will take behaviorDuration time to be traversed.
Parameters:
{CAAT.Path}
Returns:
this

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