Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
ScriptEngineManager Class Reference

ScriptEngineManager is a singleton which manager an object instance of ScriptEngineProtocl, such as LuaEngine. More...

Public Member Functions

 ~ScriptEngineManager (void)
 Constructor of ScriptEngineManager.
 
ScriptEngineProtocolgetScriptEngine (void)
 Get the ScriptEngineProtocol object. More...
 
void setScriptEngine (ScriptEngineProtocol *scriptEngine)
 Set the ScriptEngineProtocol object should be managed. More...
 
void removeScriptEngine (void)
 Remove the ScriptEngineProtocol object managed.
 

Static Public Member Functions

static ScriptEngineManagergetInstance ()
 Get the instance of ScriptEngineManager object. More...
 
static void destroyInstance ()
 Destroy the singleton of ScriptEngineManager.
 
static bool sendActionEventToJS (Action *actionObject, int eventType, void *param)
 send the node event to JS More...
 
static bool sendNodeEventToJSExtended (Node *node, int action)
 send the extended event of Node to JS More...
 
static void sendNodeEventToLua (Node *node, int action)
 Call the Lua function when the event of node is triggered. More...
 
static ScriptEngineManagersharedManager ()
static void purgeSharedManager ()

Detailed Description

ScriptEngineManager is a singleton which manager an object instance of ScriptEngineProtocl, such as LuaEngine.

Member Function Documentation

ScriptEngineProtocol*
getScriptEngine
( void  )
inline

Get the ScriptEngineProtocol object.

the ScriptEngineProtocol object.

void setScriptEngine ( ScriptEngineProtocol scriptEngine)

Set the ScriptEngineProtocol object should be managed.

the ScriptEngineProtocol object should be managered.

static ScriptEngineManager*
getInstance
( )
static

Get the instance of ScriptEngineManager object.

the instance of ScriptEngineManager object.

static bool sendActionEventToJS ( Action actionObject,
int  eventType,
void *  param 
)
static

send the node event to JS

the pointer of node object.

action.

true if execute successfully,otherwise false.

static bool
sendNodeEventToJSExtended
( Node node,
int  action 
)
static

send the extended event of Node to JS

the pointer of node object.

action.

true if execute successfully,otherwise false.

static void sendNodeEventToLua ( Node node,
int  action 
)
static

Call the Lua function when the event of node is triggered.

the nativeobject triggers the event. the specific action type.

static ScriptEngineManager*
sharedManager
( )
inlinestatic
static void purgeSharedManager ( )
inlinestatic

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