Axmol Engine 2.4.0-258ceca
|
Calls a 'callback'. More...
#include <ActionInstant.h>
Inherits ActionInstant.
Inherited by CallFuncN.
Public Member Functions | |
virtual void | execute () |
Executes the callback. | |
virtual void | update (float time) override |
bool | initWithFunction (const std::function< void()> &func) |
initializes the action with the std::function<void()> @lua NA | |
![]() | |
virtual void | step (float dt) override |
Static Public Member Functions | |
static CallFunc * | create (const std::function< void()> &func) |
Creates the action with the callback of type std::function<void()>. | |
Calls a 'callback'.
|
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).
func | A callback function need to be executed. |
|
overridevirtual |
time | In seconds. |
Reimplemented from ActionInstant.