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

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

1261. 分享:LayaAir下如何获取图集下的小图资源? [ 51%]

....loader.load([{url:"res/atlas/atlas_res.json",type:Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //获取图集下的单张小图 var texture:Texture=Laya.loader.getRes("atlas_res/01.png"); var sp:Sprite=new Sprite(); sp.graphics.drawTexture(texture,200,100); ...

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

1262. 被遮罩的对象的子显示对象再添加遮罩,子显示对象的遮罩显示不正确 [ 51%]

...k = imgMask; Laya.Tween.to(this.img, {x:100}, 10000).update = Laya.Handler.create(this, this.updateMsk, null, false); } private updateMsk():void { this.img.mask.graphics.clear(true); this.img.mask.graphics.drawRect(100 - this.img.x, 0, this.img.width, 300, "#ffffff"); } 附件 : --> LayaTest.rar 201...

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

1263. 多光源渲染(ActionScript-3D基础(AS3)-LayaAir3D之灯光) [ 51%]

...d("res/threeDimen/scene/MultiLightScene/InventoryScene_Forest.ls", Handler.create(this, function (scene: Scene3D): void { //添加到场景 Laya.stage.addChild(scene); var camera: Camera = scene.getChildByName("Main Camera") as Camera; camera.addComponent(CameraMoveScript); camera.transform.localPos...

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

1264. 关于Panel的双指响应问题 [ 51%]

...{         Laya.loader.load("../../res/ui/dialog (3).png", Laya.Handler.create(this, function(){     var dialog = new Image("../../res/ui/dialog (3).png");     dialog.scaleX = 2;     dialog.scaleY = 2;     var panel = new Panel();     panel.vScrollBarSkin = "";     panel.hScrollBarSki...

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

1265. 通过Spine工具导出缩小了比例,游戏中显示部分节点坐标和比例出错 [ 51%]

....Skeleton();         tmpSpine.load("spineFile/6402.sk",Laya.Handler.create(this,()=>{             tmpSpine.showSkinByIndex(2);//皮肤ID:1,2             tmpSpine.play("idea",true);         }),1);         tmpSpine.x = 365;         tmpSpine.y = ...

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

1266. 分享:Skeleton下Event.LABLE('label')事件的使用 [ 51%]

... "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) if(tEventData.name=="'fall'") { trace('fall'); } else if(tEventData.name=="'jump'") { trace('jump'); } else if(tEventData.name=="'stand'") { trace('stand'); } else if(tEventData.name=="'walk'") { trace('...

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

1267. 求助关于TiledMap的版本问题 [ 51%]

...ectangle(0, 0, Browser.width, Browser.height); //创建TiledMap地图 tMap.createMap("res/TiledMap/orthogonal-outside.json",viewRect, Handler.create(this, this.onCreateMapLoaded)); } private function onCreateMapLoaded():void { trace("loaded..."); } } } testTiledMap.zip 2018-04-28 2 2 分享 微博 Q...

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

1268. this.scene.physicsSimulation.rayCastAll 报错 [ 51%]

...ya.Scene3D.load('LayaScene_OldHouse/Conventional/OldHouse.ls',Laya.Handler.create(this,this.onComplete)); 的onComplete方法进行赋值的吗?这里赋值的onComplete(scene) 应该是Scene3D 的吧? 努力 • 2019-05-24 21:22 大佬,我将代码上传了,您看一下,谢谢

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

1269. 同步龙骨插槽动画方案 [ 51%]

...} }     xx{     this.mSketon = new MSketon(this.type, Laya.Handler.create(this, this.onSkeLoaded), 2);     Laya.timer.frameLoop(1, this, this.update); ..........................................................................................................................................

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

1270. 执行回调函数时报is not a function [ 51%]

...roxy.as setRoleCall,但是回调回来执行getRolesBack的时候,loadCreateRole()报错:this.loadCreateRole is not a function。 回调函数里的函数执行不了吗?求解决办法。//Main.as private function loadRoles():void {     SocketProxy.instance.setRoleCall(getRolesBack); } ...

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