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

大约有 1,171 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0053 秒)

271. DialogUI,在内部按钮监听事件没效果是引擎设定?还是我用法错误? [ 78%]

...confirm, cancel, 在InputTxtDialog 类里面cancel_btn.on(Event.CLICK, this, this.onCancel));没有反映,但是在调用InputTxtDialog的地方InputTxtDialog.cancel_btn.on(Event.CLICK, this, this.onCancel));是没有问题的,同样的代码,粘出来就行,在里面就不行 2018-09-07...

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

272. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 78%]

...{ htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmet...

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

273. 其他引擎的Demo-Example_05 [ 78%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

274. 其他引擎的Demo-Example_05 [ 78%]

....SCALE_FULL; setup(); })(); function setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (point...

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

275. 输入设备-指南针 [ 78%]

...ignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.instance.on...

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

276. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 78%]

...wn,down下开始move,up时移除move和up事件 sp.on(Event.MOUSE_DOWN,this,onDown); Laya.stage.on(Event.MOUSE_UP,this,onUp); } private function onUp():void { Laya.stage.off(Event.MOUSE_MOVE,this,onMove); } private function onDown(e:Event):void { Laya.stage.on(Event.MOUSE_MOVE,this,onMove); } pr...

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

277. [LayaAir3]GList点击出现连续点击问题 [ 78%]

...调用这一句,否则显得不正规; 例如在 onAwake 的第一行. this.Gbox_list.setVirtual();   其次对于virtual list, 相当于在复用cell, 逻辑上100行的,实际上是在反反复复就重复用那几个. 因此你 on(xxx....) 这种语法,如果滚动后发生cell复用,相...

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

278. 输入设备-指南针 [ 78%]

...stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); // // 画出其他UI this.drawUI(); // // 创...

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

279. layaAir真的没办法做涂鸦板? [ 78%]

...Laya.Sprite(); Laya.stage.addChild(s); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,function(e){ arr.push([e.stageX,e.stageY]); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,bb) }) Laya.stage.on(Laya.Event.MOUSE_UP,this,function(){ Laya.stage.off(Laya.Event.MOUSE_MOVE,this,bb) }) function bb(e){ s.graphics.c...

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

280. 这样的panel请问如何实现比较好? [ 78%]

.../点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的按钮,会隐藏该层,同时显示上一层 this.btnChange.on(Laya.Event.CLICK, this, this.change, [1]); //初始时默认上面一层不...

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