Class CCScriptEngineProtocol

#include <Geode/cocos/script_support/CCScriptSupport.h>
classCCScriptEngineProtocol{ ... }
No description provided
Examples0
Public static methods0
Public member functions20
virtualcocos2d::ccScriptTypegetScriptType()

Get script type

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()=0

Execute script code contained in the given string.

Parameters

codes

holding the valid script code that should be executed.
Return value
other if the string is executed wrongly.
virtualintexecuteScriptFile(
charconst*filename
)
=0

Execute a script file.

Parameters

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.

Parameters

functionName

String object holding the name of the function, in the global script environment, that is to be executed.
Return value
The integer value returned from the script function.
virtualintexecuteNodeEvent(,
intnAction
)
=0

Execute a node event function

Parameters

pNode

which node produce this event

nAction

kCCNodeOnEnter,kCCNodeOnExit,kCCMenuItemActivated,kCCNodeOnEnterTransitionDidFinish,kCCNodeOnExitTransitionDidStart
Return value
The integer value returned from the script function.
virtualintexecuteMenuItemEvent()=0
No description provided
virtualintexecuteNotificationEvent(,
charconst*pszName
)
=0

Execute a notification event function

virtualintexecuteCallFuncActionEvent(,)=0

execute a callfun event

virtualintexecuteSchedule(
intnHandler
,,)
=0

execute a schedule function

virtualintexecuteLayerTouchesEvent(,
inteventType
,)
=0

functions for executing touch event

virtualintexecuteLayerTouchEvent(,
inteventType
,)
=0
No description provided
virtualintexecuteLayerKeypadEvent(,
inteventType
)
=0

functions for keypad event

virtualintexecuteAccelerometerEvent(,
cocos2d::CCAcceleration*pAccelerationValue
)
=0

execute a accelerometer event

virtualintexecuteEvent(
intnHandler
,
charconst*pEventName
,
cocos2d::CCObject*pEventSource
,
charconst*pEventSourceClassName
)
=0

function for common event

virtualintexecuteEventWithArgs(
intnHandler
,)

function for c++ call back lua funtion

virtualboolhandleAssert()=0

called by CCAssert to allow scripting engine to handle failed assertions

Return value
true if the assert was handled by the script engine, false otherwise.
virtualboolparseConfig(,)=0
No description provided
Fields0
Protected member functions0
Protected fields0