Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
CallFuncN Class Reference

Calls a 'callback' with the node as the first argument. More...

#include <ActionInstant.h>

Inherits CallFunc.

Public Member Functions

virtual void execute () override
 Executes the callback.
 
bool initWithFunction (const std::function< void(Node *)> &func)
 initializes the action with the std::function<void(Node*)>
 
- Public Member Functions inherited from CallFunc
virtual void update (float time) override
 
bool initWithFunction (const std::function< void()> &func)
 initializes the action with the std::function<void()> @lua NA
 
- Public Member Functions inherited from ActionInstant
virtual void step (float dt) override
 

Static Public Member Functions

static CallFuncNcreate (const std::function< void(Node *)> &func)
 Creates the action with the callback of type std::function<void()>.
 
- Static Public Member Functions inherited from CallFunc
static CallFunccreate (const std::function< void()> &func)
 Creates the action with the callback of type std::function<void()>.
 

Detailed Description

Calls a 'callback' with the node as the first argument.

N means Node. @js NA

Member Function Documentation

◆ create()

static CallFuncN * create ( const std::function< void(Node *)> & func)
static

Creates the action with the callback of type std::function<void()>.

This is the preferred way to create the callback.

Parameters
funcA callback function need to be executed.
Returns
An autoreleased CallFuncN object.

The documentation for this class was generated from the following file: