[]关于event中只读属性touches,问题,求解
主类:
输出为:
不明白touches属性数组里面存储的什么类型的数据,第二个不明白touches如何使用
求解答
package
{
import laya.display.Text;
import laya.events.Event;
import laya.webgl.WebGL;
public class DemoTouch
{
public function DemoTouch()
{
Laya.init(800, 600, WebGL);
Laya.stage.bgColor = "#232628";
var txt:Text = new Text();
txt.text = "hello";
txt.color = "#FF00FF";
txt.width = 100;
txt.height = 100;
txt.x = 200;
txt.y = 100;
txt.fontSize = 50;
txt.on("click", this, onFunc);
Laya.stage.addChild(txt);
}
private function onFunc(e:Event):void
{
var arr:Array = e.touches;
console.log("e.touchId="+e.touchId);
console.log("arr[0]"+arr[0]);
}
}
}
输出为:
不明白touches属性数组里面存储的什么类型的数据,第二个不明白touches如何使用
求解答
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
gmajrtfp
赞同来自:
多点?