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

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

701. Cannot read property 'rayCast' of undefined [ 68%]

...sky.lh", Laya.Handler.create(this, this.onLoadFinish)); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); } onLoadFinish(layaMonkey){ this.layaMonkey=this.scene.addChild(layaMonkey); // Laya.timer.frameLoop(1, this, this.onFrameLoop); } onFrameLoop(){ this.layaMonkey.transform.rotate(this....

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

702. 如何获取list下单元格的坐标点? [ 68%]

... list.mouseHandler=new Handler(this,onClick); } private function onClick(e:Event,index:int):void { if(e.type==Event.CLICK) { trace("xy:"+list.getCell(index).x,list.getCell(index).y); } }上面的坐标是相对于list本身的,如果你想取得全局坐标可以通过localToGlobal方法来得到...

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

703. 请问2.0射线到底如何使用呢? [ 68%]

... function 构造函数() { // 添加鼠标点击事件 Laya.stage.on( Event.MOUSE_DOWN, this, onMouseDown ); // 射线初始化 ray = new Ray( new Vector3(0,0,0), new Vector3(0,0,0) ); } // 鼠标点击方法 function onMouseDown(){     // 获取鼠标在屏幕点击的位置     var po...

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

704. 用JS原生态window.location.href跳转 [ 68%]

...器上运行是正常的package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; public class LayaAirTest { public function LayaAirTest() { Laya.init(550,400); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FFFF00"); Laya.stage.addChild(sp); sp.size(...

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

705. 微信小游戏分包实战(TypeScript-小游戏适配文档-微信小游戏) [ 68%]

...钮btnA的点击事件,触发后处理 this.GameMain.newUI.btnA.on(Laya.Event.CLICK, this, this.showB); } //显示B页 private showB():void { this.GameMain.showUI(this.ui.bUI,this.GameMain.newUI) //监听按钮btnB的点击事件,触发后处理 this.GameMain.newUI.btnB.on(Laya.Event.CLICK, this...

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

706. cavans上触发不了input的点击事件 [ 68%]

...添加一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发不了input控件。 <input id="fileInput" type="fil...

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

707. 微信飞机大战中“开始页面”逻辑功能关于js继承问题 [ 68%]

...出错 this.btn_start.visible=false; //监听界面是否关闭 this.once(Event.CLOSE,this,onClose); //加载剩余游戏资源、音乐,加载完成与加载进度回调方法 Laya.loader.load(assetArr,Handler.create(this,onComplete),Handler.create(this,onProgress)) } return GameStart(); })();  ...

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

708. 获取相机renderTexture 作为阴影 的UV [ 67%]

...mouseHandler 怎么获取条目 如何获取图片每个像素点的RGB? Event.MOUSE_WHEEL 如何获取鼠标滚轮是放大开始缩小 lh文件内meshSprite添加阴影属性无效 怎么获取对象的坐标 怎样获取浏览器地址传过来的GET参数 分享:LayaAir下如何获取图集...

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

709. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 67%]

...tils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.nam...

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

710. Spine3D渲染器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 67%]

... 记录当前皮肤状态 //播放停止后执行逻辑 this.owner.on(Laya.Event.STOPPED, this, () => { // 通过三元运算符切换皮肤名称 currentSkin = currentSkin === "full-skins/girl" ? "full-skins/girl-blue-cape" : "full-skins/girl"; this.spine3D.skinName = currentSkin; this.spine3D.p...

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