Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
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.
 

Public Attributes

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

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.

Member Data Documentation

Touch* touch

touch information.

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

var touch

touch information.

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

local touch

touch information.

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


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