大约有 4,111 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0106 秒)
Laya_社区(3330) Laya2.0_文档(296) Laya_示例(141) Laya3.0_文档(118) Laya2.0_示例(117) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...清理的一点疑问 在场景中有一个按钮组件,设置了监听 this.btn.on(Laya.Event.CLICK, this, this.changeData);,, 然后切换场景 ,是不是要在 onDestroy(): void { if (this.btn) { // 清理所有以 this 为 caller 的事件 ...
来源: Laya_社区 发布时间: 20260114
...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
...et连接不上(已解决) socket = new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.connect("127.0.0.1", 8080); 照着官方例子,服务器显示连接上了,但onSocketOpen没调用到,而且socket的connected为false。 能帮忙看是什么原因么? 具体代码:...
来源: Laya_社区 发布时间: 20170209
...= 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
...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
...引用方式,方便其他类引用 GameMain.instance = this; //加载场景文件 this.loadScene("main_scene.scene"); } setup(){ Laya.SoundManager.playMusic("music/d1.mp3", 1, new Laya.Handler(this, this...
来源: Laya_社区 发布时间: 20200925
... 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
...张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
...台 Laya.init(500, 300); this.drawSomething(); } private drawSomething(): void { this.sp = new Sprite(); Laya.stage.addChild(this.sp); //画...
来源: Laya2.0_文档 发布时间: 20210715
... 微博 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