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

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

1. 加载-错误处理和进度 [ 100%]

...Laya.loader.retryNum = 0; var urls = ["do not exist", "res/fighter/fighter.png", "res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, this.onAssetLoaded), Handler.create(this, this.onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, this.onErr...

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

2. 性能测试-卡通人物2 [ 93%]

...开发更高效。let amount = 500, character1 = [ "res/cartoon2/yd-6_01.png", "res/cartoon2/yd-6_02.png", "res/cartoon2/yd-6_03.png", "res/cartoon2/yd-6_04.png", "res/cartoon2/yd-6_05.png", "res/cartoon2/yd-6_06.png", "res/cartoon2/yd-6_07.png", "res/cartoon2/yd-6_08.png", ], character2 = [ "res/ca...

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

3. 屏幕适配-屏幕适配 [ 90%]

...相对布局 let boy1 = new Image(); boy1.skin = "res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", this, this.onBoyClick); Laya.stage.addChild(boy1); //实例一个小人,放到右下角,并相对布局 let boy2 = new Image(); boy2.skin = "res/cartoonCharacters/2.png"...

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

4. 其他引擎的Demo-Example_23 [ 80%]

...r = new Sprite(); laser.loadImage("res/pixi/laser0" + ((type % 5) + 1) + ".png"); type++; laser.life = 0; let pos1; let pos2; if (type % 2) { pos1 = new Point(-20, Math.random() * viewHeight); pos2 = new Point(viewWidth, Math.random() * viewHeight + 20); } else { pos1 = new Point(Math.random() * vie...

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