大约有 1,013 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0215 秒)
...Laya.Pool.getPoolBySign("Bullet"); // 查看当前对象池内对象数量 console.log( bulletPool.length ); if( bulletPool.length == 0 ) { // 把子弹放入对象池 pool.push( new Bullet() ); } 2.2 清理一个对象池 /** * 清除对象池的对象。 * @param sign 对象类型标识字符。 *...
来源: Laya3.0_文档 发布时间: 20251010
...e(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载完成"); }scence1.json { "height":25, "infinite":false, "layers":[ { "data":[7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
来源: Laya_社区 发布时间: 20180326
.../ this.COLUMNS | 0) * this.VERTICAL_SPACING + this.yOffset; btn.pos(x, y); console.log(x, y); } } private createButton(skin: string): Laya.Button { var btn: Laya.Button = new Laya.Button(skin); this.owner.addChild(btn); return btn; } } 上述代码运行效果如动图2-1所示: (动图2-1) Copyri...
来源: Laya3.0_文档 发布时间: 20251010
... xhr.send("res/data.data","","get","text"); function processHandler(data){ console.log(data); } function errorHandler(data){ } function completeHandler(e){ } ``` 上面这个示例我们发送了一个简单的请求,方式是get方式。用来获取一个远端的文件,格式为文本的格式...
来源: Laya2.0_文档 发布时间: 20210714
...同来自: button.on(Laya.Event.CLICK, this, function(event:Laya.Event){ console.log("点击到了UI"); event.stopPropagation(); }); 完整代码 2018-05-30 0 17 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 你这个问题描述的很明确,很好,这个按钮正常来讲,会挡住下...
来源: Laya_社区 发布时间: 20180529
...); // 程序入口 class GameMain { constructor() { // Laya.init(600,400); console.log("start"); var exportCls = new t.TestExportCls(); exportCls.callFunc(); } } new GameMain(); } http://requirejs.org/docs/errors.html#mismatch at makeError (file:///E:/laya/TestImport/bin/node_modules/requirejs/requi...
来源: Laya_社区 发布时间: 20171116
...t;HTML文本</span>"; htmlDiv.innerHTML = html; htmlDiv.pos(50,200); console.log("文本的实际宽度为"+htmlDiv.contextWidth,"文本的实际高度为"+htmlDiv.contextHeight) Laya.stage.addChild(htmlDiv); 运行效果: 运行输出:文本的实际宽度为158.677734375 文本的实际...
来源: Laya3.0_文档 发布时间: 20230303
...此时可以魔改一下 if (_inline) { yield updateDcc(); if (!isDccOk) { console.log("init dcc fail"); return; } } if( !(yield dj_hook.OnDccOk()) ) { if (window["onLayaInitError"]) { window["onLayaInitError"]("Update index error"); } return; } var data = yield asyncs.loadText(url); for (var n = 0;...
来源: Laya_社区 发布时间: 20190516
...tring): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获取这个粒子特效的所有粒子系统,用于后面...
来源: Laya3.0_文档 发布时间: 20251010
...tring): void { if (this._isInited) { return; } this._filePath = file_path; console.log("Particle3D"); //从拿到的粒子系统克隆一个 var res = Laya.loader.getRes(file_path); var particle = res.clone(); this._particle = particle; //获取这个粒子特效的所有粒子系统,用于后面...
来源: Laya3.0_文档 发布时间: 20250104