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

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

401. 关于大量绘制 draw的性能优化问题 [ 70%]

...   var Browser = laya.utils.Browser; var Stat    = laya.utils.Stat; var Event   = laya.events.Event; var Sprite =  laya.display.Sprite; Laya.init(800, 1030); Stat.show(0,0); var drawLayer = new Sprite(); Laya.stage.addChild(drawLayer); drawLayer.width = 800; drawLayer.height = 1030; drawLayer.o...

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

402. laya.d3.component.Script [ 70%]

...All Classes | Index | Frames No Frames ScriptProperties | Methods | Events Packagelaya.d3.componentClasspublic class ScriptInheritanceScript Component3D EventDispatcher Object Script 类用于创建脚本的父类。 Public Properties Hide Inherited Public Properties Show Inherited Public Pro...

来源: laya_api 发布时间: 20170929

403. 还是自定义事件问题。 [ 70%]

...", this, this.onChange,this._data);  监听    在A类  抛事件 this.event("vj_move","abc");   断点监听处  this._data没数据   是不是写法有问题???   2017-11-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接...

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

404. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 70%]

...ic btnLogin:Laya.Button;  constructor(){ super();  this.btnLogin.on(Laya.Event.CLICK,this,()=>{ console.log('btnLogin click') }) }  createChildren(){ super.createChildren(); this.loadScene('LoginScene'); }   }     import LoginScene from "./script/LoginScene" /* * 游戏初始化配置; */ e...

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

405. dialog第一次可以正常调出,第二次无法正常popup出来 [ 70%]

...oginView.prototype.init = function () {         this.btnReg.on(Laya.Event.CLICK, this, this.onBtnReg);         this.btnLogin.on(Laya.Event.CLICK, this, this.onBtnLogin);         this.dlg = new NormalDialog();         this.dlg.init();     };   附件 : --> firstgame.ra...

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

406. 分享一下自己的屏幕适配方案 [ 70%]

....ImgX=this.Img.x; this.ImgY =this.Img.y; this.layout(); Laya.stage.on(Laya.Event.RESIZE, this, this.layout); Laya.stage.on(Laya.Event.ADDED, this, this.layout);   layout(){ var bWidth:number = Browser.width; //浏览器的宽 var bHeight:number = Browser.height;//浏览器的高   var wRatio:numbe...

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

407. Animator如何监听播放完毕 [ 70%]

...如何监听播放完毕 版本 2.0.0bate4 , 1.0版本的Animator.on( Laya.Event.COMPLETE ) 方法在2.0.0bate4中行不通 . 那目前如何监听动画播放结束呢 ???? 2018-11-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...

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

408. 2D物理-复合碰撞器 [ 70%]

...LE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBox(); this.eventListener(); } createBox() { const width = 300, height = 20; const posx = Laya.Browser.width / 2, posy = Laya.Browser.height / 2; let box = this.box = new Laya.Sprite(); box.size(width + height * 2, width + height * 2); b...

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

409. 加上size设置后,精灵不能点击. [ 70%]

...0.33 ? "img/flower2.png" : "img/flower3.jpg" img.loadImage(s); img.on(Laya.Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "i...

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

410. 输入设备-贪吃蛇(重力感应) [ 70%]

...化蛇 initSnake(); // 监视加速器状态 Accelerator.instance.on(Laya.Event.CHANGE, this, monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, animate); // 食物生产 Laya.timer.loop(3000, this, produceFood); // 游戏开始时有一个食物 produceFood(); })() function initSnak...

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