Axmol 3.0.0-89d6d9a
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

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
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
void step (float dt) override
void update (float time) override

Static Public Member Functions

static CallFuncN * create (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 CallFunc * create (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.

Member Function Documentation

◆ create()

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:
  • ActionInstant.h