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

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

601. Image和HtmlImageElement加载同一张图会显示不出来 [ 72%]

...HTML = "<img src='res/test1.png'/>"; html.pos(150, 100); Laya.stage.addChild(img); Laya.stage.addChild(html); 按照这个顺序,图片test1.png加载不出来 2018-12-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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

602. drawToTexture截大图有问题,会丢失 [ 72%]

..."#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawTo...

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

603. 请问UI页面怎么移除 [ 72%]

...I页面怎么移除 我在login.ui里面一个按钮事件触发Laya.stage.addChild(new game());然后这个是动态事件,怎么样在login.ui函数里面先移除这个game.ui页面后再addChild进来呢。因为多次事件触发后就相当于NEW了很多进来。尝试login.remoeChild(game)...

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

604. 物理引擎-Slingshot [ 72%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, width: 800, height: 600, options: { backgrou...

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

605. 精灵添加名称 [ 72%]

...3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function onsp(e:Event){              console.log("监听到按钮"+e.target);              console.log((e.target.getChildAt(0) as Sprite).name);              console.log(e.t...

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

606. 学习官方视频教程中飞机大战游戏出现的问题!! [ 72%]

...     //把实例化好的飞机添加进容器内             this.addChild(this.playAnim);             this.playAnim.on(Laya.Event.COMPLETE,this,this.onPlayComplete);         } onMouseMove():void{         //根据鼠标位移主角方法         this.hero.pos(Laya.stage.mo...

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

607. list 加载动画为什么实现的效果会错乱掉? [ 72%]

... ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya.stage.width - WID * list.re...

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

608. Tween回调方法里如何带参数? [ 72%]

...rite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); Tween.to(sp,{x:300,y:300,alpha:0.5},1000,null,Handler.create(this,function():void { sp.destroy(); })); Complete事件你没写错,就是那么写的     2017-06-08 0 0 分享 微博 QZONE 微信 ohkei - as3...

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

609. 文本怎么实现 文+动态图或者动画? [ 72%]

...tml.innerHTML="<ani src='res/动画图集'></ani>"; Laya.stage.addChild(imageHtml);   2018-03-09 0 5 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 simphen 相关问题 微信关系链:LayaAir引擎针对微信小游戏好友...

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

610. ProgressBar属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 72%]

...s.progressBar.changeHandler = new Handler(this, this.onChange); Laya.stage.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); } private changeValue(): void { if (this.progressBar.value >= 1) this.progressBar.value = 0; this.progressBar.value += 0.05; } private onChange(value: ...

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