大约有 4,373 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0102 秒)
Laya_社区(2475) Laya3.0_api(673) Laya2.0_api(357) laya_api(289) Laya2.0_文档(271) Laya_示例(157) Laya2.0_示例(116) Laya3.0_文档(35)
...错误), //因此延迟一帧以销毁 Laya.timer.frameOnce(1, this, function () { this.weapon.destroy(); }); 这个延迟一帧的bug修复了吗? 目前用到的直接销毁还是会报错,不知道是不是我逻辑问题。 谢谢! 2018-03-12 添加评论 免费帖 --> 分享 微博...
来源: Laya_社区 发布时间: 20180312
MovieClip的target和currentTarget属性为undefined? private function showNowPic():void{ for each(var ul:String in pics){ var mc:MovieClip = new MovieClip; mc.load(ul); this.addChild(mc); mc.on(Event.COMPLETE,this,stopNowMC) } } private function stopNowMC(e:Event):void{ trace(e.currentTarget); t...
来源: Laya_社区 发布时间: 20161221
...nager.playSound("sound/bg1.mp3", 0); Laya.stage.on(Laya.Event.FOCUS, null, function(){ console.log("获取焦点") Laya.SoundManager.playSound("sound/bg1.mp3", 0); }) Laya.stage.on(Laya.Event.BLUR, null, function(){ console.log("失去焦点") }) 2018-08-07 添加评论 免费帖 --> 分享 微博 Q...
来源: Laya_社区 发布时间: 20180807
切换位图,点击图片距离容器的区域也会触发点击事件 function TransitionImg() { this.flag = false; //判断条件 this.img1 = "../laya/assets/comp/haoyoubang-liang.png"; //地址 this.img2 = "../laya/assets/comp/haoyuobang-hui.png"; var img = new Laya.Sprite(); //实例 img.widt...
来源: Laya_社区 发布时间: 20180502
... /** *@inheritDoc */ __proto.onAsynLoaded=function(url,data,params){ var json=data[0] if (json.type!=="Scene"){ if (url == "scene/Demo_Interiors.ls"){ console.log(data[0]); throw new Error("Scene: the .lh file root type must be Scene,please use other fu...
来源: Laya_社区 发布时间: 20180101
...ey3.png"; private var flag:Boolean = false; private var ape:Sprite; public function Sprite_SwitchTexture() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.sta...
来源: Laya2.0_示例 发布时间: 20260303
... 21:05 浏览: 1392 关注: 2 人 熊猫大侠 • 2018-01-19 09:20 public function Test1View() { Laya.timer.loop(10,this,draw); } private function draw():void { texture = Laya.loader.getRes("comp/lhjicon_5.png"); var temp:Texture = Texture.createFromTexture(texture,0,0,texture.sourceWidth...
来源: Laya_社区 发布时间: 20180118
Laya.loader Progress回调形同虚设 private function beginLoad():void { //加载引擎需要的资源 Laya.loader.load([ "res/1.png", "res/2.png", "res/3.png", "res/4.png", "res/5.png", "res/6.png", "res/7.png" ], Handler.create(this, onLoaded),Handler.create(this, onProgress)); //Laya.loader.lo...
来源: Laya_社区 发布时间: 20180428
...TiledMap/orthogonal.json",viewRect,Laya.Handler.create(this,onMapLoaded)); function onMapLoaded(){ //将原地图放大2倍 this.tMap.scale = 2; } ``` 运行效果如图8所示。  (图8) #### 2.2.2 设置地图缩放的中心点 很明显,图8中的效果并不是我们想要的...
来源: Laya2.0_文档 发布时间: 20210715
...a.net.Loader; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String...
来源: Laya_社区 发布时间: 20170807