大约有 4,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0083 秒)
Laya_社区(3323) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(116) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...: override protected function _onEnable():void { for (var i = 0, n = this._controllerLayers.length; i < n; i++) { if (this._controllerLayers[i].playOnWake) { var controllerLayer = this._controllerLayers[i]; var curPlayState = controllerLayer._currentPlayState; if (curPlayState == null) { var...
来源: Laya_社区 发布时间: 20190513
...ny = null, lineWidth: number = 1, percent?: boolean): DrawRectCmd { return this.addCmd(DrawRectCmd.create(x, y, width, height, fillColor, lineColor, lineWidth, percent)); } 代码示例: let sp = new Laya.Sprite(); //画矩形 sp.graphics.drawRect(20, 20, 100, 50, "#ffff00", "#00ff00", 5, false); ...
来源: Laya3.0_文档 发布时间: 20251010
Animation提示未定义 function FarmIndexView() { FarmIndexView.super(this); this.aniCloud = new Animation(); this.aniCloud.loadAnimation("AniCloud.ani"); Laya.stage.addChild(this.aniCloud); }报错 Uncaught ReferenceError: Animation is not defined 2017-10-26 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20171026
...: zjw917329684 参考下下面的写法吧: Laya.stage.once(Event.CLICK,this,onClick); } private function onClick():void { trace("aaa"); Laya.stage.off(Event.CLICK,this,onClick); Laya.timer.once(500,this,onLoop); } private function onLoop():void { Laya.stage.once(Event.CLICK,this,onClick); } 2017-...
来源: Laya_社区 发布时间: 20170619
...的type为mouseup,由于scrollBar移除了mouseUp事件,所以此时的this._events[type]是undefined,而源码中又去取undefined的run属性,肯定会报错,可以改成如下几句 let newListener=this._events[type]; if (listeners.length === 0 && this._events && newListene...
来源: Laya_社区 发布时间: 20211227
...***192 赞同来自: zjwytqm 、cuixueying 、umi_ Laya.timer.loop(1000, this, animateTimeBased);//添加 Laya.timer.clear(this,animateTimeBased); //删除 2017-06-05 3 3 分享 微博 QZONE 微信 Y_Yao 赞同来自: 清除定时器clear(); 2017-06-05 0 0 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20170605
...如何用代码触发点击事件? 比如sprite1注册了点击事件: this.sprite1.on(Laya.Event.CLICK, this, this.sprite1CallBack); 怎样不用点击,而用代码去触发? 是 this.sprite1.event(Laya.Event.CLICK) 这样吗? 2018-07-24 1 条评论 免费帖 --> 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20180724
...http.timeout = 10000;//设置超时时间; xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.on(Laya.Event.PROGRESS, this, this.processHandler); xhr.send("res/data.data", "", "get", "text"); console.log("aaaa"); } private processHan...
来源: Laya2.0_文档 发布时间: 20210715
为什么显示不了 var sp = new Laya.Sprite(); sp.graphics.drawRect(this.mouse_x, this.mouse_y, 10, 10, "#ff0000"); //var htmlC:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0).getCanvas().toDataURL(); var htmlCanvas:Laya.HTMLCanvas = sp.drawToCanvas(375,440,0,0); var texture:Laya.Texture = new La...
来源: Laya_社区 发布时间: 20180412
...onhide里面停止掉引起bug的代码 window['wx'].onShow((res) => { this.event(AppEvent.onShow, res); this.appStatus = AppEvent.onShow; console.log(this.appStatus, '---------'); Laya.stage.renderingEnabled = true//恢复渲染 Laya.updateTimer.resume() //恢复onUpdate Laya.timer.resume(); //...
来源: Laya_社区 发布时间: 20200917