Class cc.CallFunc
- Defined in: CCActionInstant.js
- Extends cc.ActionInstant
Constructor Attributes | Constructor Name and Description |
---|---|
Calls a 'callback'
|
Method Summary
Class Detail
cc.CallFunc()
Calls a 'callback'
Method Detail
-
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} selector
- {object|null} selectorTarget Optional
- {*|Null} data Optional
- data for function, it accepts all data types.
- Returns:
- {cc.CallFunc}
-
execute()execute the function.
-
{object} getTargetCallback()
- Returns:
- {object}
-
{boolean} initWithFunction(func)initializes the action with the std::function
- Parameters:
- {function} func
- Returns:
- {boolean}
-
{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