函数:on 按下
函数功能:随机分配的手指 id 在 (x,y) 处按下
函数方法
touch = touch:on(x,y)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
x | number | 是 | 屏幕横坐标 |
y | number | 是 | 屏幕纵坐标 |
函数用例
--此函数为触动精灵专用函数请勿用于积木编程
--使用本函数库必须在脚本开头引用并将文件放到设备 lua 目录下
--仅支持 1.2.7 以上版本的 TSLib
require "TSLib"
touch():on(100,100):off()
--使用本函数库必须在脚本开头引用并将文件放到设备 lua 目录下
--仅支持 V1.3.3 以上版本的 TSLib
require "TSLib"
local touch = touch()
touch:on(100,100):off()
--仅支持 V1.3.3 以上版本的 TSLib
require "TSLib"
local touch = touch()
touch = touch:on(100,100)
touch = touch:Delay(20)
touch:off()
注意事项
安卓设备点击、滑动函数无效可以换此函数再试下
此函数为触动精灵专用函数请勿用于积木编程