#include <CCScriptSupport.h>
Enumerator |
---|
NONE |
|
COCOSTUDIO |
|
virtual int executeGlobalFunction |
( |
const char * |
functionName) | |
|
|
pure virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
- Parameters
-
functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
- Returns
- The integer value returned from the script function.
Implemented in LuaEngine.
virtual int executeScriptFile |
( |
const char * |
filename) | |
|
|
pure virtual |
Execute a script file.
- Parameters
-
filename | String object holding the filename of the script file that is to be executed |
Implemented in LuaEngine.
virtual int executeString |
( |
const char * |
codes) | |
|
|
pure virtual |
Execute script code contained in the given string.
- Parameters
-
codes | holding the valid script code that should be executed. |
- Returns
- 0 if the string is executed correctly.
-
other if the string is executed wrongly.
Implemented in LuaEngine.
virtual bool handleAssert |
( |
const char * |
msg) | |
|
|
pure virtual |
called by CCAssert to allow scripting engine to handle failed assertions
- Returns
- true if the assert was handled by the script engine, false otherwise.
Implemented in LuaEngine.
virtual bool isCalledFromScript |
( |
) | |
|
|
inlinevirtual |
virtual bool parseConfig |
( |
ConfigType |
type, |
|
|
const std::string & |
str |
|
) |
| |
|
pure virtual |
Parse configuration file.
Implemented in LuaEngine.
virtual int reallocateScriptHandler |
( |
int |
handler) | |
|
|
inlinevirtual |
Reallocate script function handler, only LuaEngine class need to implement this function.
Reimplemented in LuaEngine.
virtual void removeScriptHandler |
( |
int |
handler) | |
|
|
inlinevirtual |
Remove script function handler, only LuaEngine class need to implement this function.
Reimplemented in LuaEngine.
virtual void
removeScriptObjectByObject |
( |
Ref * |
obj) | |
|
|
pure virtual |
Remove script object.
Implemented in LuaEngine.
when trigger a script event ,call this func,add params needed into ScriptEvent object.nativeObject is object triggering the event, can be nullptr in lua
Implemented in LuaEngine.
virtual void setCalledFromScript |
( |
bool |
callFromScript) | |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: