资讯 社区 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

TouchController

此类封装TouchController相关操作,负责手指出屏屏幕事件的管理。

Public methods
TouchController set_update_handler
设置请求的结果回调,返回服务器的完整数据

TouchController Demo

TouchController TouchControllerDemo ()

demo示例

sample:
local input_controller = scene:get_input_controller()
local touch_controller = input_controller:get_touch_controller()
touch_controller:set_update_handler(on_touch_update)
function on_touch_update(touch)
end

set_update_handler

version 190

void set_update_handler(function)

设置请求的结果回调,返回服务器的完整数据

Parameters

  • LUA FUNCTION | function : 回调函数
sample:
local touch_controller = scene:get_touch_controller()
touch_controller:set_update_handler(function(touch) 
end)
上一篇
Joystick
下一篇
TouchEvent