大约有 2,654 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0067 秒)
Laya_社区(2024) Laya3.0_api(163) laya_api(112) Laya2.0_api(107) Laya2.0_文档(82) Laya_示例(68) Laya2.0_示例(51) Laya3.0_文档(47)
BUG:添加RigidBody组件会使anchorX、anchorY失效 onClick(event: Laya.Event) { let sp = new Laya.Image(); sp.skin = "comp/tab.png" let body = new Laya.RigidBody(); body.gravityScale = 0; sp.addComponentIntance(body); sp.anchorX = sp.anchorY = 0.5; sp.pos(event.stageX, event.stageY); this.own...
来源: Laya_社区 发布时间: 20200216
.../mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); //mArmature.on(Event.LABEL, this, onEvent); mArmature.on(Event.STOPPED, this, completeHandler); mArmature.on(Event.CLICK, this, onChangeSkin); mArmature.showSkinByName(mSkinList[0]); play(); //changeSkin(); //Laya.timer.loop(1000, this, cha...
来源: Laya_社区 发布时间: 20170818
...ndler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.http.once(Laya.Event.ERROR, this, this.onHttpRequestError); this.http.send(url, 'chapterid=7125', ...
来源: Laya_社区 发布时间: 20180916
...代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find"); return; } //保护修改-----en...
来源: Laya_社区 发布时间: 20180910
...stage.bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this....
来源: Laya_社区 发布时间: 20170721
a、b 两个按钮响应同一个点击回调,但event的 target和currentTarget相同都是stage对象,怎么解释呀 实际代码中,两个按钮通过currenttarget,确实能够区分开来,但是打印的值,currenttarget和target值都是stage对象,这个问题谁能给解释下...
来源: Laya_社区 发布时间: 20180301
... sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.MOUSE_OVER,this,onMouse); sp.on(Event.MOUSE_OUT,this,onMouse); Laya.stage.addChild(sp); Stat.show(); } private fu...
来源: Laya_社区 发布时间: 20170920
... last_z = 0;'); __JS__('var canShake = 1'); __JS__('if (window.DeviceMotionEvent){window.addEventListener("devicemotion", deviceMotionHandler, false)'); __JS__('}else{alert("你的设备不支持DeviceMotion事件");}'); __JS__('function deviceMotionHandler(eventData){var acceleration = eventData.ac...
来源: Laya_社区 发布时间: 20160110
安卓自带浏览器切到后台,没触发Event.VISIBILITY_CHANGE,也导致了背景音乐关不掉,求解决方案 谷歌浏览器,uc浏览器没有这样的问题。。。 2017-08-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...
来源: Laya_社区 发布时间: 20170814
...Index | Frames No Frames ShurikenParticleSystemProperties | Methods | Events Packagelaya.d3.core.particleShuriKenClasspublic class ShurikenParticleSystemInheritanceShurikenParticleSystem GeometryFilter EventDispatcher ObjectImplements IRenderable, laya.d3.core.IClone ShurikenParticleSystem 类...
来源: laya_api 发布时间: 20170929