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}
-
ctor(selector, selectorTarget, data)Creates a CallFunc action with the callback Constructor of cc.CallFunc
// example // CallFunc without data var finish = new cc.CallFunc(this.removeSprite, this); // CallFunc with data var finish = new cc.CallFunc(this.removeFromParentAndCleanup, this, true);
- Parameters:
- {function} selector
- {object|null} selectorTarget Optional
- {*|null} data Optional
- data for function, it accepts all data types.
-
execute()execute the function.
-
{object} getTargetCallback()
- Returns:
- {object}
-
{Boolean} initWithFunction(selector, selectorTarget, data)Initializes the action with a function or function and its target
- Parameters:
- {function} selector
- {object|Null} selectorTarget
- {*|Null} data Optional
- data for function, it accepts all data types.
- Returns:
- {Boolean}
-
setTargetCallback(sel)
- Parameters:
- {object} sel
-
update(time)
- Parameters:
- {Number} time