• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 147 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0035 秒)

1. 鼠标交互-修正交互区域 [ 100%]

...); // 设置舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, this.onDown); } createCoralRect() { const Sprite = Laya.Sprite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设...

来源: Laya2.0_示例 发布时间: 20240929

2. 鼠标交互-修正交互区域 [ 99%]

...); // 设置舞台 Laya.stage.name = "暗灰色舞台" Laya.stage.on(Event.MOUSE_DOWN, this, onDown); } function createCoralRect() { var coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器";...

来源: Laya_示例 发布时间: 20240929

3. [LayaAir3]挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错 [ 99%]

...Air3]挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错  挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown);} 点击就报错 附件 : --> 2023-12-20 添加评论 免费...

来源: Laya_社区 发布时间: 20231220

4. 按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次点击才会响应 [ 97%]

按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次点击才会响应 this.btn_begin_fire.on(Laya.Event.MOUSE_DOWN,this,this.onBtnBeginFireClick); 按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次...

来源: Laya_社区 发布时间: 20180413

5. 鼠标交互-鼠标交互 [ 95%]

... - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); r...

来源: Laya_示例 发布时间: 20240929

6. 鼠标交互-鼠标交互 [ 95%]

... - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.MOUSE_UP, this, this.mouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, th...

来源: Laya2.0_示例 发布时间: 20240929

7. 求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 [ 95%]

求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 点击的调用函数: private function OnDown(e:Event):void { Browser.window.open("http://baidu.com"); } Laya.stage.on(Event.KEY_DOWN, this, OnDown);//正常 Laya.stage.on(Event.MOUSE_DOWN, this, OnDown);//被拦截 La...

来源: Laya_社区 发布时间: 20181227

8. Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 [ 92%]

Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 this.textinput_message.on(Laya.Event.CLICK,this,()=>{ console.log("CLICK>>>"); }) this.textinput_message.on(Laya.Event.MOUSE_DOWN,this,()=>{ console.log("MOUSE_DO...

来源: Laya_社区 发布时间: 20190315

9. 鼠标交互-双指旋转(多点触控) [ 90%]

...ge.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX);...

来源: Laya_示例 发布时间: 20240929

10. 鼠标交互-双指旋转(多点触控) [ 90%]

...this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - to...

来源: Laya2.0_示例 发布时间: 20240929