Class cc.TargetedAction
Extends
cc.ActionInterval.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Overrides the target of an action so that it always runs on the target |
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.TargetedAction.create(target, action)
Create an action with the specified action and forced target
|
return the target that the action will be forced to run with
|
|
initWithTarget(target, action)
Init an action with the specified action and forced target
|
|
setForcedTarget(forcedTarget)
set the target that the action will be forced to run with
|
|
startWithTarget(target)
|
|
stop()
|
|
update(time)
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, initWithDuration, isDone, reverse, setAmplitudeRate, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, setDuration
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget
Class Detail
cc.TargetedAction()
Overrides the target of an action so that it always runs on the target
specified at action creation rather than the one specified by runAction.
Method Detail
<static>
cc.TargetedAction.create(target, action)
Create an action with the specified action and forced target
- Parameters:
- {cc.Node} target
- {cc.FiniteTimeAction} action
{cc.Node}
getForcedTarget()
return the target that the action will be forced to run with
- Returns:
- {cc.Node}
{Boolean}
initWithTarget(target, action)
Init an action with the specified action and forced target
- Parameters:
- {cc.Node} target
- {cc.FiniteTimeAction} action
- Returns:
- {Boolean}
setForcedTarget(forcedTarget)
set the target that the action will be forced to run with
- Parameters:
- {cc.Node} forcedTarget
startWithTarget(target)
- Parameters:
- target
stop()
update(time)
- Parameters:
- time