Cocos2d-x  v4
TouchScriptData Struct Reference

For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType converted to string type into the Lua stack as the parameters when the touch event is triggered. More...

Public Member Functions

 TouchScriptData (EventTouch::EventCode inActionType, void *inNativeObject, Touch *inTouch, Event *evt)
 Constructor of TouchScriptData. More...
 

Public Attributes

EventTouch::EventCode actionType
 The EventTouch::EventCode type. More...
 
void * nativeObject
 For Lua, it Used to find the Lua function pointer by the ScriptHandlerMgr. More...
 
Touchtouch
 touch information. More...
 
Eventevent
 event information,it is useless for Lua. More...
 

Detailed Description

For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType converted to string type into the Lua stack as the parameters when the touch event is triggered.

@js NA

Constructor & Destructor Documentation

◆ TouchScriptData()

TouchScriptData ( EventTouch::EventCode  inActionType,
void *  inNativeObject,
Touch inTouch,
Event evt 
)
inline

Constructor of TouchScriptData.

@lua NA @js NA

Member Data Documentation

◆ actionType

The EventTouch::EventCode type.

@lua NA @js NA

◆ nativeObject

void* nativeObject

For Lua, it Used to find the Lua function pointer by the ScriptHandlerMgr.

@lua NA @js NA

◆ touch

Touch* touch

touch information.

it would be in x,y form to push into the Lua stack.

@lua NA @js NA

◆ event

Event* event

event information,it is useless for Lua.

@lua NA @js NA


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