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

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

281. Sprite-切换纹理 [ 95%]

...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(Laya.stage.width / 2, Laya.stage.height / 2); // 显示默认纹理 switchTexture(); ape.on("c...

来源: Laya_示例 发布时间: 20241002

282. laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本 [ 95%]

...{ super(); }  loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小的地图块 this.y = posY; //这里是256*整数倍的叠加 每张图片都是256*256大...

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

283. ipad 声音管理无法暂停继续播放,只能从头开始,pc端正常,代码如下 [ 95%]

...pc端正常,代码如下    private playSoundLead() {         if (!this.soundMan || this.playBoo) {             this.soundMan = Laya.SoundManager.playMusic(this.leadSoundUrl, 1, Handler.create(this, this.soundEndFun1));             this._btnTimeOutPlay.visible = true;        ...

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

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

... var Game = (function(){ (function Game(){ // 子弹发射偏移位置表 this.bulletPos = [[0],[-15,15],[-30,0,30],[-45,-15,15,45]]; // 关卡等级 this.level = 0; // 升级等级所需要的成绩数量 this.levelUpScore = 0; // 积分成绩 this.score = 0; // 子弹级别 this.bulletLevel = 0; ...

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

285. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 95%]

[LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 laya3 加载资源后使用 Laya.loader.on(Event.ERROR, this, this.onError) 无法获得加载失败响应,根据示例里的错误处理和进度操作也得不到错误的响应,laya2里是可以的...

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

286. 摄像机捕捉目标(JavaScript-3D基础(JS)-LayaAir3D之Camera) [ 95%]

...,通过鼠标点击按钮切换注视目标。 ```typescript //up向量 this._up = new Laya.Vector3(0, 1, 0); ``` ```typescript //点击事件 this.changeActionButton.on(Laya.Event.CLICK, this, function(){ this.index++; if (this.index % 3 === 1 ){ //摄像机捕捉模型目标 this.camera.transfor...

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

287. 为什么list不能滑动,怎么让list滑动 [ 95%]

...:必须是类,不能是实例化对象,Item需类继承于Box) // this.gradeList.vScrollBarSkin = ""; this.gradeList.itemRender = GradeItem; //列表显示区单元格的列数 this.gradeList.repeatX = 5; //列表显示区单元格的行数 this.gradeList.repeatY = 10;  this.gradeList.space...

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

288. WebXR · LayaAir3.0文档 · LAYABOX [ 95%]

...览器是否支持VR模式,有三种模式immersive-vr\immersive-ar\inline this.changeActionButton.visible = await WebXRExperienceHelper.supportXR("immersive-vr"); immersive-vr就是VR模式的参数,如果是AR模式,参数换成immersive-ar即可。本篇文档只介绍VR模式。 如果检测...

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

289. 龙骨动画残影 [ 95%]

...     {         console.log("ani created:" + ani);         this._hero = ani;         this.addChild(this._hero);         this._hero.pos(300, 400);         this._hero.scale(0.3, 0.3);         this._hero.on(Laya.Event.STOPPED, this, this._onPlayed);     ...

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

290. 前述问题this.sp3Role.transform.position无效 [ 95%]

前述问题this.sp3Role.transform.position无效 您好,之前这个帖子(http://ask.layabox.com/question/50395)你们回复的this.sp3Role.transform.position这个方法只让主角移动和camera.transform.position相机跟随无效,因为主角无法移动,camara还没办法尝试,...

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