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

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

1921. 示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function [ 75%]

示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function $ adb shell am start -n "com.layabox.game/demo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.layabox.game.test | com.layabox.game Conn...

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

1922. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 75%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

来源: Laya3.0_文档 发布时间: 20230303

1923. [LayaAir3]GList点击出现连续点击问题 [ 75%]

...调用这一句,否则显得不正规; 例如在 onAwake 的第一行. this.Gbox_list.setVirtual();   其次对于virtual list, 相当于在复用cell, 逻辑上100行的,实际上是在反反复复就重复用那几个. 因此你 on(xxx....) 这种语法,如果滚动后发生cell复用,相...

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

1924. 图集打包后使用Texture不显示,项目整个已经传上来了 [ 75%]

...andler = Laya.Handler; class GameMain{ constructor() { Laya.init(600,400); this.hahaha(); } private hahaha(): void { var assets: Array<any> = []; assets.push({ url: "res/start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.onComplete)); } private onComplete(): ...

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

1925. 鼠标事件:为什么没有设置穿透,也会发生穿透现象? [ 75%]

... bg = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path);             this.addChild(bg);             bg.x = 0;             bg.y = 0;                          var bg2:Sprite = CreateObj.createSprite(McUrlMgr.LOAD_BG_Path);             bg2.x = 0;    ...

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

1926. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 75%]

...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(200, 200); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } func...

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

1927. [LayaAir3]OPPO小游戏下图片地址无法加载 [ 75%]

...ure) => { let sp = new Laya.Sprite(); sp.texture = res; sp.pos(0, 200); this.addChild(sp); });无法正常显示 检查发现 qg.downloadFile  报 error {         "errCode": -3,         "statusCode": 404,         "errMsg": "com.nearme.instant.loopj.android.http.HttpResponseException"...

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

1928. image.drawToCanvas方法获取的一直是空的png [ 75%]

....stage.bgColor = "#232628"; Laya.loader.load("res/logo.png",Handler.create(this,onLoaded)); } private function onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClic...

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

1929. 加载不了模型 [ 75%]

...ial;       Laya.loader.create("cj\cj-default001.lm",Laya.Handler.create(this,this.onCreateComplete));       function onCreateComplete() {    var mesh = Laya.loader.getRes("cj\cj-default001.lm");   var meshSprite3D = new Laya.MeshSprite3D(mesh);   this.scene.addChild(meshSprite3D); } //mode...

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

1930. 使用百度地图显示当前位置(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 75%]

...bleHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, updatePosition), Laya.Handler.create(this, onError)); // 绑定作用域 convertToBaiduCoord = convertToBaiduCoord.bind(this); ``` ​ 由于本例不需要使用LayaAir的显示元素,因此舞台尺寸设置为1。...

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