Calls a 'callback'.
More...
|
| static CallFunc * | create (const std::function< void()> &func) |
| | Creates the action with the callback of type std::function<void()>. More...
|
| |
| static CallFunc * | create (Ref *target, SEL_CallFunc selector) |
| | Creates the action with the callback. More...
|
| |
|
| bool | initWithTarget (Ref *target) |
| | initializes the action with the callback typedef void (Ref::*SEL_CallFunc)(); More...
|
| |
|
bool | initWithFunction (const std::function< void()> &func) |
| | initializes the action with the std::function<void()> NA
|
| |
|
|
unsigned int | _ID |
| | object id, ScriptSupport need public _ID
|
| |
|
int | _luaID |
| | Lua reference id.
|
| |
|
void * | _scriptObject |
| | scriptObject, support for swift
|
| |
|
bool | _rooted |
| | When true, it means that the object was already rooted.
|
| |
| static const int | INVALID_TAG = -1 |
| | Default tag used for all the actions. More...
|
| |
◆ create() [1/2]
| static CallFunc* create |
( |
const std::function< void()> & |
func | ) |
|
|
static |
Creates the action with the callback of type std::function<void()>.
This is the preferred way to create the callback. When this function bound in js or lua ,the input param will be changed. In js: var create(var func, var this, var [data]) or var create(var func). In lua:local create(local funcID).
- Parameters
-
| func | A callback function need to be executed. |
- Returns
- An autoreleased CallFunc object.
◆ create() [2/2]
| static CallFunc* create |
( |
Ref * |
target, |
|
|
SEL_CallFunc |
selector |
|
) |
| |
|
static |
Creates the action with the callback.
typedef void (Ref::*SEL_CallFunc)();
◆ getTargetCallback()
| Ref* getTargetCallback |
( |
| ) |
|
|
inline |
Get the selector target.
- Returns
- The selector target.
◆ setTargetCallback()
| void setTargetCallback |
( |
Ref * |
sel | ) |
|
|
inline |
Set the selector target.
- Parameters
-
◆ update()
| virtual void update |
( |
float |
time | ) |
|
|
overridevirtual |
◆ reverse()
| virtual CallFunc* reverse |
( |
void |
| ) |
const |
|
overridevirtual |
Returns a new action that performs the exact reverse of the action.
- Returns
- A new action that performs the exact reverse of the action. NA
Reimplemented from ActionInstant.
◆ clone()
◆ initWithTarget()
| bool initWithTarget |
( |
Ref * |
target | ) |
|
|
protected |
initializes the action with the callback typedef void (Ref::*SEL_CallFunc)();
The documentation for this class was generated from the following file: