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

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

1081. Sprite3D-Sprite3D加载 [ 63%]

...mport laya.d3.resource.models.Mesh; import laya.display.Stage; import laya.events.Event; import laya.resource.Texture; import laya.utils.Handler; import laya.utils.Stat; import common.CameraMoveScript; public class Sprite3DLoad { public function Sprite3DLoad() { Laya3D.init(0, 0, true); Laya.stage.s...

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

1082. 【求助】关于Cannot read property 'visible' of undefined问题 [ 63%]

... this.foodsList[this.index]; console.log(currentFood); this.currentFood.on(Event.MOUSE_DOWN, this, onMouseDown); this.currentFood.on(Event.MOUSE_UP, this, onMouseUp); }currentFood也是Food类,是用来指向在foodList中处于下标index的元素,我是想在用currentFood指向某个元素,...

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

1083. 画出来鼠标轨迹线 [ 63%]

...全彩老婆的遮罩层 var times=800;//持久时间 Laya.stage.on(Laya.Event.MOUSE_MOVE,this,mousemove);//事件绑定,当鼠标移动时触发mousemove事件 //把声明的第一个老婆变成灰色老婆(通过添加灰色的色彩滤镜) var grayscaleMat = [0.3086, 0.6094, 0.0820, 0, 0, ...

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

1084. Laya2.2.0,官方demo,Iphone Xs Max 14.0 锁屏小游戏卡死 [ 63%]

...de里面停止掉引起bug的代码 window['wx'].onShow((res) => { this.event(AppEvent.onShow, res); this.appStatus = AppEvent.onShow; console.log(this.appStatus, '---------'); Laya.stage.renderingEnabled = true//恢复渲染 Laya.updateTimer.resume() //恢复onUpdate Laya.timer.resume(); //恢...

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

1085. Laya.SoundManager.playSound()问题,任务不是当前标签停止播放,当任务回到当前标签页,不能恢复播放 [ 62%]

...音效都会播放不会停止,  另外一个方法是:::::::使用Laya.Event.FOCUS和Laya.Event.BLUR,监听舞台失去焦点和获得焦点事件,让控制获得焦点重新播放,注意,不能直接使用soundchanel进行继续播放,需要使用SoundManager重新获取使url,再...

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

1086. 使用方向键 控制精灵在格子中移动 [ 62%]

... 可以加我的微信 一起研究 13890999   事件 Laya.stage.on(Laya.Event.KEY_UP,this,this.onkeyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e...

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

1087. 【音效BUG】在游戏失焦后再次返回游戏导致音效播放异常的问题与解决方案 [ 62%]

...为失焦而自动暂停,监听游戏失焦事件:Laya.stage.on(Laya.Event.BLUR,this,this.method); 在失焦的回调里设置: Laya.SoundManager.musicMuted = true; Laya.SoundManager.stopMusic(); 将正在播放的音乐路径存为成员变量;   2.监听游戏获取焦点事件: 监听...

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

1088. laya.d3.core.Camera [ 62%]

...All Classes | Index | Frames No Frames CameraProperties | Methods | Events | Constants Packagelaya.d3.coreClasspublic class CameraInheritanceCamera BaseCamera Sprite3D ComponentNode Node EventDispatcher Object Camera 类用于创建摄像机。 Public Properties Hide Inherited Public Propert...

来源: laya_api 发布时间: 20170929

1089. laya.d3.core.material.PBRStandardMaterial_API3.0 [ 62%]

...tCreateURL _setGPUMemory addDefine clone cloneTo destroy effectiveProperty event getBool getBoolByIndex getBuffer getBufferByIndex getColor getColorByIndex getFloat getFloatByIndex getInt getIntByIndex getMatrix4x4 getMatrix4x4ByIndex getShaderData getShaderDataByIndex getShaderPropertyValue getText...

来源: Laya3.0_api 发布时间: 20231115

1090. 使用音频 · LayaAir3.0文档 · LAYABOX [ 62%]

...lay(0); //失去舞台焦点(切出游戏)的处理 Laya.stage.on(Laya.Event.BLUR, this, () => { _sound.stop(); }); //获得舞台焦点(切回游戏)的处理 Laya.stage.on(Laya.Event.FOCUS, this, () => { _sound.play(0); }); …… Copyright ©Layabox 2022 all right reserved,powered...

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