#include <CCScriptSupport.h>
Public Types | |
enum | ConfigType { NONE, COCOSTUDIO } |
Public Member Functions | |
virtual | ~CCScriptEngineProtocol () |
virtual ccScriptType | getScriptType () |
Get script type. More... | |
virtual void | removeScriptObjectByCCObject (CCObject *pObj)=0 |
Remove script object. More... | |
virtual void | removeScriptHandler (int nHandler) |
Remove script function handler, only CCLuaEngine class need to implement this function. More... | |
virtual int | reallocateScriptHandler (int nHandler) |
Reallocate script function handler, only CCLuaEngine class need to implement this function. More... | |
virtual int | executeString (const char *codes)=0 |
Execute script code contained in the given string. More... | |
virtual int | executeScriptFile (const char *filename)=0 |
Execute a script file. More... | |
virtual int | executeGlobalFunction (const char *functionName)=0 |
Execute a scripted global function. More... | |
virtual int | executeNodeEvent (CCNode *pNode, int nAction)=0 |
Execute a node event function. More... | |
virtual int | executeMenuItemEvent (CCMenuItem *pMenuItem)=0 |
virtual int | executeNotificationEvent (CCNotificationCenter *pNotificationCenter, const char *pszName)=0 |
Execute a notification event function. More... | |
virtual int | executeCallFuncActionEvent (CCCallFunc *pAction, CCObject *pTarget=NULL)=0 |
execute a callfun event More... | |
virtual int | executeSchedule (int nHandler, float dt, CCNode *pNode=NULL)=0 |
execute a schedule function More... | |
virtual int | executeLayerTouchesEvent (CCLayer *pLayer, int eventType, CCSet *pTouches)=0 |
functions for executing touch event More... | |
virtual int | executeLayerTouchEvent (CCLayer *pLayer, int eventType, CCTouch *pTouch)=0 |
virtual int | executeLayerKeypadEvent (CCLayer *pLayer, int eventType)=0 |
functions for keypad event More... | |
virtual int | executeAccelerometerEvent (CCLayer *pLayer, CCAcceleration *pAccelerationValue)=0 |
execute a accelerometer event More... | |
virtual int | executeEvent (int nHandler, const char *pEventName, CCObject *pEventSource=NULL, const char *pEventSourceClassName=NULL)=0 |
function for common event More... | |
virtual int | executeEventWithArgs (int nHandler, CCArray *pArgs) |
function for c++ call back lua funtion More... | |
virtual bool | handleAssert (const char *msg)=0 |
called by CCAssert to allow scripting engine to handle failed assertions More... | |
virtual bool | parseConfig (ConfigType type, const std::string &str)=0 |
enum ConfigType |
|
inlinevirtual |
|
pure virtual |
execute a accelerometer event
Implemented in CCLuaEngine.
|
pure virtual |
execute a callfun event
Implemented in CCLuaEngine.
|
pure virtual |
function for common event
Implemented in CCLuaEngine.
|
inlinevirtual |
function for c++ call back lua funtion
Reimplemented in CCLuaEngine.
|
pure virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
Implemented in CCLuaEngine.
|
pure virtual |
functions for keypad event
Implemented in CCLuaEngine.
|
pure virtual |
functions for executing touch event
Implemented in CCLuaEngine.
|
pure virtual |
Implemented in CCLuaEngine.
|
pure virtual |
Implemented in CCLuaEngine.
|
pure virtual |
Execute a node event function.
pNode | which node produce this event |
nAction | kCCNodeOnEnter,kCCNodeOnExit,kCCMenuItemActivated,kCCNodeOnEnterTransitionDidFinish,kCCNodeOnExitTransitionDidStart |
Implemented in CCLuaEngine.
|
pure virtual |
Execute a notification event function.
Implemented in CCLuaEngine.
execute a schedule function
Implemented in CCLuaEngine.
|
pure virtual |
Execute a script file.
filename | String object holding the filename of the script file that is to be executed |
Implemented in CCLuaEngine.
|
pure virtual |
Execute script code contained in the given string.
codes | holding the valid script code that should be executed. |
Implemented in CCLuaEngine.
|
inlinevirtual |
Get script type.
Reimplemented in CCLuaEngine.
|
pure virtual |
called by CCAssert to allow scripting engine to handle failed assertions
Implemented in CCLuaEngine.
|
pure virtual |
Implemented in CCLuaEngine.
|
inlinevirtual |
Reallocate script function handler, only CCLuaEngine class need to implement this function.
Reimplemented in CCLuaEngine.
|
inlinevirtual |
Remove script function handler, only CCLuaEngine class need to implement this function.
Reimplemented in CCLuaEngine.
|
pure virtual |
Remove script object.
Implemented in CCLuaEngine.