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

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

231. sound manager在MOUSE_OVER事件中无法播放 [ 86%]

...e.height - soundButton.height) / 2;             Laya.stage.addChild(soundButton);              //创建一个Sprite充当音乐播放按钮             var musicButton: Sprite = this.createButton("播放音乐");             musicButton.x = ...

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

232. 粒子-粒子演示1 [ 86%]

...{ sp = new Particle2D(settings); sp.emitter.start(); sp.play(); Laya.stage.addChild(sp); sp.x = Laya.stage.width / 2; sp.y = Laya.stage.height / 2; } })();module laya { import Stage = Laya.Stage; import Loader = Laya.Loader; import Particle2D = Laya.Particle2D; import ParticleSetting = Laya.Particle...

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

233. 粒子-粒子演示1 [ 86%]

...建 Particle2D 实例 let partIns = new Particle2D(settings); Laya.stage.addChild(partIns); // 开始发射粒子 partIns.emitter.start(); // 播放 partIns.play(); partIns.x = Laya.stage.width / 2; partIns.y = Laya.stage.height / 2; } } new Particle_T1();module laya { import Stage = Laya.Stage; imp...

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

234. List组件拖动浏览时item会出现重叠的现象 [ 86%]

...lBar.elasticBackTime = 200; list.scrollBar.elasticDistance = 5; Laya.stage.addChild(list); // 设置数据项为对应图片的路径 var data: Array<string> = []; for (var i: number = 0; i < 2; ++i) { data.push("img_common_pinzhi0.png"); data.push("img_common_pinzhi1.png"); data.push("img_...

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

235. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 86%]

... bg.graphics.drawTexture(texture, 0, 0); //将bg添加到舞台 Laya.stage.addChild(bg);  我们再次刷新页面看看有什么效果   嗯 看来图片出来了~~~不错 现在我们可以开始继续了   //=======================  美丽的分割线 =======================   编写RunGame...

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

236. 3D+2D场景截屏,在不同浏览器显示效果不一致 [ 86%]

...pi.filters = spi1.filters = spi2.filters = [blurFilter]; this.owner.parent.addChild(spi); this.owner.parent.addChild(spi1); this.owner.parent.addChild(spi2); // }) }求教以下大佬们,是否还有其他的截屏方法(使用了drawToCanvas,因为3d场景对象比较复杂,无法实现预期...

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

237. 文本-HTML文本 [ 86%]

...ml } function createParagraph() { var p = new HTMLDivElement(); Laya.stage.addChild(p); p.style.font = "Impact"; p.style.fontSize = 30; var html = "使用"; html += "HTMLDivElement"; html += "创建的"; html += "HTML文本"; p.innerHTML = html; } function showExternalHTML() { var p = new HTMLIframe...

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

238. UI-ComboBox [ 86%]

...mboBox.selectHandler = new Handler(this, onSelect, [comboBox]); Laya.stage.addChild(comboBox); return comboBox; } function onSelect(cb) { console.log("选中了: " + cb.selectedLabel); } })();module laya { import Stage = Laya.Stage; import ComboBox = Laya.ComboBox; import Handler = Laya.Handler; i...

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

239. 求助高手请进,关于场景导入的问题~ [ 85%]

...:Scene = Laya.loader.getRes("LayaScene_01/loveScene.ls");     Laya.stage.addChild(scene); }   我现在的问题是,我创建一个继承Scene的类,在这个类里边我怎么去给自己设置场景资源? var scene1:GameScene = new GameScene(); Laya.stage.addChild(scene1);   public clas...

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

240. Laya.loader.load 教程代码出错 [ 85%]

...plated(e:*=null):void         {             Laya.stage.addChild(img);             img.on("click",this,OnImgClick);             OnImgClick();                          var txt:Text = new Text();             txt.text = "loa...

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