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

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

631. image在相应loaded的时候,无法正确获取高度 [ 70%]

....engine.world, this.matterBody); this.matterBody.layaSprite = this; Matter.Events.on(GameMain.instance.engine, 'beforeUpdate', (()=> { console.log("update", this.x, this.y, this.width, this.height) }).bind(this)); } 第一个打印,this.height是没有形变时候的参数,只有执行了一...

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

632. 点击list的时候触发的e.target永远是被点击的item? [ 70%]

...Button; var my_clip:Clip=cell.getChildByName("my_clip") as Clip; my_btn.on(Event.CLICK,this,onBtnClick,["my_btn"]); my_clip.on(Event.CLICK,this,onClipClick,["my_clip"]); } private function onBtnClick(name:String):void { // TODO Auto Generated method stub trace(name); } private function onClipClick(n...

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

633. H5页面的骨骼动画不能显示完整,兼容性问题? [ 70%]

...this.fishIndex]; this.mFactory = new Laya.Templet(); this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete); this.mFactory.loadAni(aniPath); } // 动画解析完成,添加到舞台,并且开始swim parseComplete(): void { this.mArmature = this.mFactory.buildArmature(0); this.mArmature.x =...

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

634. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 70%]

...ask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); ``` **LayaAir引擎中正确的用法示例:** ```java Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphi...

来源: Laya2.0_文档 发布时间: 20191206

635. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 70%]

...ask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); ``` **LayaAir引擎中正确的用法示例:** ```java Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphi...

来源: Laya2.0_文档 发布时间: 20210714

636. 微信小游戏iOS滑出控制中心或通知中心,导致音乐自动停止。 [ 70%]

...提交 1 个回复 bpmf_d 赞同来自: // 失去焦点 Laya.stage.on(Laya.Event.BLUR,this,function(){}); // 获得焦点 Laya.stage.on(Laya.Event.FOCUS,this,function(){}); 可以试试这两个方法如果不行  就请提供一下可以复现的demo 2019-05-09 0 0 分享 微博 QZONE 微信 为...

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

637. 关闭指定定时器timer [ 70%]

...器还在继续调用回调,并没有报错。this.StartToRound.on(Laya.Event.CLICK,null,function(){ Laya.timer.loop(10,this,round);//10ms 一秒100次 }); //转动逻辑 function round(){ tlate.rotation+=roundTurnChange(1); console.log(tlate.rotation); } //转动变量变化 function roundTurnCha...

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

638. 寻路系统(JavaScript-3D基础(JS)-LayaAir3D之高级应用) [ 70%]

...界的路径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Laya.Event.MOUSE_UP, this, function() { this.index = 0; //获取每次生成路径 this.getGridIndex(this.path[this.curPathIndex % this.pointCount].x, this.path[this.curPathIndex++ % this.pointCount].z, this.startPoint); this.getGri...

来源: Laya2.0_文档 发布时间: 20210714

639. dialog.removeSelf is not a function [ 70%]

...laneGameInfoDialogUI;。。。(关闭按钮)this.ui.ibtn_close.on(Laya.Event.CLICK,this,this.ui.close);。。。(点击之后)Uncaught TypeError: dialog.removeSelf is not a function....求助大神谢谢啦~~~ 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

640. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 70%]

...例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !this.flag) ? this.img1 : this.img2; img.loadImage(imgUrl, 100, 100) }...

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