大约有 483 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0058 秒)
...按钮btnA的点击事件,触发后处理 UI.btnA.on(Laya.Event.CLICK, this, showB); } ``` 代码分出后,我们不要忘了在主包内调用微信小游戏官方提供的分包加载与回调通知方法。在示例项目中,我们直接在图集加载的回调里,加载分包。然后在...
来源: Laya2.0_文档 发布时间: 20210715
...priteToAnimationNode=function(sprite,nodeName,isLink){ if (this._avatar){ 这一步必须要有 avatar 文件,但是用新的2.0插件导出的角色不带avatar文件导致无法挂载,可在GameUI.ts 41行下断点调试进入查看。 var actor = Laya.Loader.getRes("res/Lay...
来源: Laya_社区 发布时间: 20191011
... console.log("线段数量:", wayList.length); this.mainScene.addChild(pl); for (let i = 1; i < wayList.length; i++) { pl.addLine(wayList[i - 1], wayList[i], Laya.Color.RED, Laya.Color.RED); } 2019-1...
来源: Laya_社区 发布时间: 20180426
...('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => { console.log('scene 2', scene.active, scene.activeInHierarchy); }); 日志: 附件 : --> demo.zip 2019-04-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请:...
来源: Laya_社区 发布时间: 20190422
如何在场景中获得node的位置信息? let target3 = this.scene.getChildByName("Target3"); 现在我需要知道target3这个node的位置信息。有什么办法吗? 2017-11-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...
来源: Laya_社区 发布时间: 20171121
...必须的 @IEditorEnv.regClass() export class TestSceneScript { //注意:this是当前的IEditorEnv.IGameScene对象,如果不需要,也可以省略这个声明 static test(this: IEditorEnv.IGameScene, msg: string) { console.log(msg); //hello return "ok"; } } //下面是UI进程的代码 let r...
来源: Laya3.0_文档 发布时间: 20240918
...stage.bgColor = "#ffffff"; if (Browser.onMiniGame) { Laya.timer.once(1000, this, function():void{ //设置共享画布大小 __JS__('sharedCanvas').width = Laya.stage.width; __JS__('sharedCanvas').height = Laya.stage.height; //主域往子域透传消息 __JS__('wx').postMessage({type:"resizeShared"...
来源: Laya_社区 发布时间: 20180525
...码如下 var templet:Templet= new Templet(); templet.on(Event.COMPLETE, this, loadPlaneSkComplete); templet.loadAni("a.sk?v=1"); 出现的问题: 加载a.sk?v=1这个文件后,底层自动加载a.png 在chrome的开发者工具中看到,这个a.png是没有版本号的 2018-04-04 0 0 分...
来源: Laya_社区 发布时间: 20180404
...ketball.png"); ball_skin.pivot(ball_skin.width / 2, ball_skin.height / 2); this.ball = Matter.Bodies.circle(0, -100, 34, { layaSprite: ball_skin, // 绑定一个laya的Sprite, 不能用render.sprite density: 1, // 密度 restitution: 0.85 // 弹性 }); 2017-07-04 添加评论 ...
来源: Laya_社区 发布时间: 20170704
...s 1 5907 error Failed at the electron@1.7.9 postinstall script. 5907 error This is probably not a problem with npm. There is likely additional logging output above. 5908 verbose exit [ 1, true ] 附件 : --> 2017-12-06T10_02_53_392Z-debug.zip 2017-12-06 添加评论 免费帖 --> 分享 微博 QZONE...
来源: Laya_社区 发布时间: 20171206