Get script type
Class CCScriptEngineProtocol
#include <Geode/cocos/script_support/CCScriptSupport.h>
classCCScriptEngineProtocol{ ... }
No description provided
Examples0
Public static methods0
Public member functions20
virtualcocos2d::ccScriptTypegetScriptType()
virtualvoidremoveScriptObjectByCCObject()=0
Remove script object.
virtualvoidremoveScriptHandler(intnHandler)
Remove script function handler, only CCLuaEngine class need to implement this function.
virtualintreallocateScriptHandler(intnHandler)
Reallocate script function handler, only CCLuaEngine class need to implement this function.
virtualintexecuteString(charconst*codes)=0
Execute script code contained in the given string.
codes
holding the valid script code that should be executed.
other if the string is executed wrongly.
virtualintexecuteScriptFile(charconst*filename)=0
Execute a script file.
filename
String object holding the filename of the script file that is to be executed
virtualintexecuteGlobalFunction(charconst*functionName)=0
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.
The integer value returned from the script function.
virtualintexecuteNodeEvent(cocos2d::CCNode*pNode,intnAction)=0
Execute a node event function
pNode
which node produce this event
nAction
kCCNodeOnEnter,kCCNodeOnExit,kCCMenuItemActivated,kCCNodeOnEnterTransitionDidFinish,kCCNodeOnExitTransitionDidStart
The integer value returned from the script function.
virtualintexecuteMenuItemEvent(cocos2d::CCMenuItem*pMenuItem)=0
No description provided
virtualintexecuteNotificationEvent(cocos2d::CCNotificationCenter*pNotificationCenter,charconst*pszName)=0
Execute a notification event function
virtualintexecuteCallFuncActionEvent(cocos2d::CCCallFunc*pAction,cocos2d::CCObject*pTarget)=0
execute a callfun event
virtualintexecuteSchedule(intnHandler,floatdt,cocos2d::CCNode*pNode)=0
execute a schedule function
virtualintexecuteLayerTouchesEvent(cocos2d::CCLayer*pLayer,inteventType,cocos2d::CCSet*pTouches)=0
functions for executing touch event
virtualintexecuteLayerTouchEvent(cocos2d::CCLayer*pLayer,inteventType,cocos2d::CCTouch*pTouch)=0
No description provided
virtualintexecuteLayerKeypadEvent(cocos2d::CCLayer*pLayer,inteventType)=0
functions for keypad event
virtualintexecuteAccelerometerEvent(cocos2d::CCLayer*pLayer,cocos2d::CCAcceleration*pAccelerationValue)=0
execute a accelerometer event
virtualintexecuteEvent(intnHandler,charconst*pEventName,cocos2d::CCObject*pEventSource,charconst*pEventSourceClassName)=0
function for common event
virtualintexecuteEventWithArgs(intnHandler,cocos2d::CCArray*pArgs)
function for c++ call back lua funtion
virtualboolhandleAssert(charconst*msg)=0
called by CCAssert to allow scripting engine to handle failed assertions
true if the assert was handled by the script engine, false otherwise.
virtualboolparseConfig(,)=0
No description provided