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

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

761. [LayaAirIDE3]关于事件清理的一点疑问 [ 90%]

...清理的一点疑问 在场景中有一个按钮组件,设置了监听 this.btn.on(Laya.Event.CLICK, this, this.changeData);,,   然后切换场景 ,是不是要在 onDestroy(): void {         if (this.btn) {             // 清理所有以 this 为 caller 的事件         ...

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

762. 分享-js资源进度加载 [ 90%]

...on", type: Laya.Loader.ATLAS }]; Laya.loader.load(arr, Laya.Handler.create(this, this.onProgress)); } onProgress() { this.Progress = new Progress(); Laya.stage.addChild(this.Progress); //加载资源进度并且监听 Laya.loader.load(this.arr, Laya.Handler.create(this, this.onAssetsLoaded), Laya.Ha...

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

763. Socket连接不上(已解决) [ 90%]

...et连接不上(已解决) socket = new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.connect("127.0.0.1", 8080); 照着官方例子,服务器显示连接上了,但onSocketOpen没调用到,而且socket的connected为false。 能帮忙看是什么原因么?   具体代码:...

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

764. 被遮罩的显示对象的子显示对象再添加遮罩,则子显示对象显示不正确 [ 90%]

...= new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000).update = Laya.Handler.create(this, th...

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

765. ts项目 模块问题 [ 90%]

...export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this._size, this._color); } }   //a文件 import player from './player'; // 程序入口 class GameMain { constructor() { Laya.init(640, 9...

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

766. ios苹果手机,同时播放声音出现巨大杂音 [ 90%]

...引用方式,方便其他类引用         GameMain.instance = this;         //加载场景文件         this.loadScene("main_scene.scene");     }          setup(){         Laya.SoundManager.playMusic("music/d1.mp3", 1, new Laya.Handler(thisthis...

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

767. replaceSlotSkinName对于spine换肤不成功 [ 90%]

... m_templet : Laya.Templet; constructor() { Laya.init(1334,750,Laya.WebGL); this.m_templet = new Laya.Templet(); this.m_templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.m_templet.on(Laya.Event.ERROR,this,this.onError); this.m_templet.loadAni("res/spine/goblins/goblins.sk"); } private o...

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

768. 加载-单一类型资源加载 [ 90%]

...张png类型资源 Laya.loader.load("res/apes/monkey0.png", Handler.create(this, this.onAssetLoaded1)); // 加载多张png类型资源 Laya.loader.load( ["res/apes/monkey0.png", "res/apes/monkey1.png", "res/apes/monkey2.png"], Handler.create(this, this.onAssetLoaded2)); } onAssetLoaded1(texture) { /...

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

769. 绘制矩形与圆角矩形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 90%]

...台             Laya.init(500, 300);             this.drawSomething();         }           private drawSomething(): void {             this.sp = new Sprite();             Laya.stage.addChild(this.sp);            //画...

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

770. Laya2.7.0 beta cannon bug [ 90%]

... 微博 QZONE 微信 Chenyazhi 赞同来自: get angularVelocity() { if (this._btColliderObject) { var phtqua = this._btColliderObject.angularVelocity; this._angularVelocity.setValue(phtqua.x, phtqua.y, phtqua.z); } return this._angularVelocity; } get totalForce() { if (this._btColliderObject) { var...

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