Class cc.CallFunc
Extends
cc.ActionInstant.
Defined in: CCActionInstant.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Calls a 'callback'
|
Method Attributes | Method Name and Description |
---|---|
copy()
|
|
<static> |
cc.CallFunc.create(selector, selectorTarget, data)
creates the action with the callback
|
execute()
execute the function.
|
|
initWithTarget(selector, selectorTarget, data)
|
|
setTargetCallback(sel)
|
|
update(time)
|
- Methods borrowed from class cc.ActionInstant:
- isDone, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, reverse, setDuration
- Methods borrowed from class cc.Action:
- copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget, startWithTarget, stop
Method Detail
copy()
<static>
{cc.CallFunc}
cc.CallFunc.create(selector, selectorTarget, data)
creates the action with the callback
// example // CallFunc without data var finish = cc.CallFunc.create(this.removeSprite, this); // CallFunc with data var finish = cc.CallFunc.create(this.removeFromParentAndCleanup, this._grossini, true),
- Parameters:
- {function|Null} selector
- {object} selectorTarget
- {*|Null} data
- data for function, it accepts all data types.
- Returns:
- {cc.CallFunc}
execute()
execute the function.
{object}
getTargetCallback()
- Returns:
- {object}
{Boolean}
initWithTarget(selector, selectorTarget, data)
- Parameters:
- {function|Null} selector
- {object} selectorTarget
- {*|Null} data
- data for function, it accepts all data types.
- Returns:
- {Boolean}
setTargetCallback(sel)
- Parameters:
- {object} sel
update(time)
- Parameters:
- {Number} time