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

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

41. 图集制作与使用详解(ActionScript-IDE篇(AS3)-使用IDE创作) [ 55%]

...的示例代码为: ```typescript //atlas方式图集使用示例 Laya.loader.load("./res/atlas/test.atlas", Handler.create(this, onLoaded)); ``` `.json`是一种兼容第三方的图集配置方式,由于`.json`文件应用广泛,不仅仅用于图集,所以为了识别是否为图集配置...

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

42. LayaAir引擎工具会员专属功能介绍(TypeScript-简介篇(TS)-LayaAir引擎简介) [ 55%]

...下: ```typescript //先加载plf类型的合并后文件Image.json Laya.loader.load([{url: "res/Image.json", type: "plf"}], Handler.create(this, function():void { //在回调里,正常使用原来的图集 Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, function():void { var img:T...

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

43. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 55%]

...e(); // 守护神 this.angel = new Sprite(); // 加载主体的背景 Laya.loader.load("res/island.png", Handler.create(this, function() { // 图片加载 var t = Laya.loader.getRes("res/island.png"); var tBall = Texture.create(t,866,190,548,305); var tTower = Texture.create(t,data.tower[towerLel].x...

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

44. [LayaAir3]微信小游戏构建已经设置允许使用纹理压缩,但是项目启动后还是加载PNG [ 54%]

... 0 0 分享 微博 QZONE 微信 Recovery 赞同来自: 微信小游戏Laya.loader.loadPackage 与 Laya.URL.basePath的互斥问题 - layabox问答社区-HTML5引擎社区-LayaAir开发者社区 试试这个 2025-09-26 0 0 分享 微博 QZONE 微信 Fany 赞同来自: 感谢@Recovery 帮助 目前...

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

45. 为什么会出现报错 ani not found:ufo1_down [ 48%]

...添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化角色 this.hero.init("hero",0,1,0,30); // 设置...

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

46. 1.7.19.1 beta 背景音乐在舞台失焦和静音状态下可能导致的无法播放的异常问题! [ 48%]

...undMuted)return null; }; var tSound; if (!Browser.onMiniGame){ tSound=Laya.loader.getRes(url); } if (!soundClass)soundClass=SoundManager._soundClass; if (!tSound){ tSound=new soundClass(); tSound.load(url); Loader.cacheRes(url,tSound); }; var channel; channel=tSound.play(startTime,loops); if (!chann...

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

47. 为什么会出现报错 ani not found:ufo1_down [ 47%]

...添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化角色 this.hero.init("hero",0,1,0,30); // 设置...

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

48. [LayaAirIDE3]xcode切入切出声音不播放 [ 46%]

... string): void {         Laya.SoundManager.stopAll();         Laya.loader.clearRes(currentBgmUrl);          Laya.loader.load([{ url: currentBgmUrl, type: Laya.Loader.SOUND }],             Laya.Handler.create(this, () => {                 console.log("----playMusic111 ...

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

49. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...内容并返回。如果不需要支持热重载,则忽略。 @Laya.regLoader(["abc"], null, true) export class DemoAssetLoader implements Laya.IResourceLoader { async load(task: Laya.ILoadTask): Promise<any> { let json = await task.loader.fetch(task.url, "json"); let res = task.obsoluteInst...

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

50. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 37%]

... Texture; set texture(value: Texture); 我们来看看代码示例: Laya.loader.load("atlas/comp/image.png").then(() => { let sprite = new Laya.Sprite(); //精灵设置纹理并居中显示 let res = Laya.loader.getRes("atlas/comp/image.png"); sprite.pos(Laya.stage.width >> 1, Laya.stage....

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