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

大约有 2,994 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0087 秒)

661. 怎么播放声音? [ 71%]

...呀,代码如下: var bg_sound:Laya.Sound =new Laya.Sound(); bg_sound.load("res/bg.mp3"); bg_sound.play(0,0);这么写的话,声音不能播放,于是我想是不是声音没有加载完,所以又这么写了:   var bg_sound:Laya.Sound =new Laya.Sound(); bg_sound.on(Laya.Event.COMPLETE,...

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

662. 小游戏 使用3D 天空盒 真机无法显示 [ 71%]

...new Laya.SkyDome(); camera.sky = skyDome; skyDome.texture = Laya.Texture2D.load("res/models/skyhome.jpg");小游戏 使用3D  天空盒 真机无法显示 就这三行代码 PC开发工具正常 真机测试 天空盒不显示 谢谢 麻烦看看呗 2018-04-08 添加评论 免费帖 --> 分享 微...

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

663. 我浏览在线文档 关于共享材质和自身材质的代码 貌似没有什么不同? [ 71%]

...scene); //方法一:直接异步加载 // var mesh:Laya.Mesh = Laya.Mesh.load("LayaScene_01/Assets/model/loveScene_jianzhu.lm"); // var meshSprite3D:Laya.MeshSprite3D = new Laya.MeshSprite3D(mesh); //方法二:预加载,创建为Sprite3D类型 Laya.loader.create("LayaScene_01/Assets/model/love...

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

664. 微信小游戏的相同的音第二次播不出来 [ 71%]

...持声音预加载,声音的播放是即用即加载的。所以用Laya.load.load预加载声音是无效的。 Jacy • 2018-05-21 23:05 @一点一滴:那要怎么处理同样一个音播放多次的情况呢?

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

665. Sprite-切换纹理 [ 71%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2);...

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

666. discard property,please use transform's property instead [ 71%]

...耗性能         directionLight.shadowPCFType = 3;         Laya.loader.create([             "res/plane.lh",             "res/LayaMonkey.lh"         ], Laya.Handler.create(this, onComplete));         var _quaternion = new Laya.Quaternion();         Laya.timer.frameLoo...

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

667. Texture自动恢复还是存在另外的问题 [ 71%]

...itmap || this._bitmap.destroyed)&& url){             Laya.loader.load(url,Handler.create(this,function(bitmap){                 _$this._bitmap=bitmap;             }),null,"htmlimage",1,false,null,true);         }     }   Laya.loader.load的cache参数...

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

668. image组件加载完成调度事件没反应? [ 71%]

...事件没反应? var dialog:Image = new Image(picAy[i]); dialog.on(Event.LOADED,this,onLoaded) private function onLoaded(e:*=null):void{ trace(2) } 这代码有什么问题?不调度onLoaded函数,图片显示正常 2016-10-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

669. 预加载音频文件遇到的问题 [ 71%]

...载音频的代码(JS飞机大战示例), //加载声音资源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.cre...

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

670. Sprite-遮罩-放大镜 [ 71%]

...ER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load("../../res/bg2.png", Handler.create(this, setup)); })(); function setup() { var bg = new Sprite(); bg.loadImage("../../res/bg2.png"); Laya.stage.addChild(bg); bg2 = new Sprite(); bg2.loadImage("../../res/bg2.png")...

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