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

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

1301. 2.0新特性常见问题(TypeScript-常见问题汇总(持续更新)-2.0常见问题) [ 50%]

...先声明一个预设变量 {Laya.loader.create("prefab/预设名字.json",Handler.create(this,onComplete)); } private function onComplete(obj:Object):Void{ 一个预设变量.json = ojb 一个sprite = Pool.getItemByCreateFun("自己起一个名字", this.一个预设变量.create, this.一个预设...

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

1302. 模仿教程里的打地鼠写的代码,运行报错 [ 50%]

...r = "#ffcccc"; //加载资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ //实例化 var tempBG=new background(); Laya.stage.addChild(tempBG); } })();在background.js里是这样写的 var background = (function (_sup...

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

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

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

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

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

....on(Event.LABEL, this, onEvent); mArmature.on(Event.STOPPED, this, completeHandler); play(); } private function onEvent(e:*):void { var tEventData:EventData = e as EventData; Laya.stage.addChild(mLabelSprite); mLabelSprite.x = mStartX; mLabelSprite.y = mStartY; mLabelSprite.graphics.clear(); mLabelS...

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

1305. ts项目加载version.json失败 [ 50%]

...Version.FILENAME_VERSION; Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.beginLoad)); } private beginLoad(): void { console.debug("aaaaaaaaaaaaaaaaa"); var img = new Laya.Sprite(); img.loadImage("res/test.jpg"); Laya.stage.addChild(img); } } new GameMain(); 调试的时...

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

1306. Panel使用文档(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 50%]

...00); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置宽高 panel.size(100, ...

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

1307. 在脚本里自定义IDE属性预制体数组类型获取的结果不对 [ 50%]

...了,用prefab内容也是json的。 Laya.loader.create("prefab/car.json",Handler.create(this,onCar)); public function onCar(obj:Object):void{ var spr:Prefab = new Prafab();              spr.json=obj;             var car:Sprite = Pool.getItemByCreateFun("Car", this.spr.creat...

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

1308. scaleMode设为full时怎么pc浏览器跟平板上效果不一样? [ 50%]

... Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load("assets/bg.jpg", Handler.create(this, loadCompleteHandler)); } private function loadCompleteHandler():void { var bg:Image = new Image("assets/bg.jpg"); Laya.stage.addChild(bg); }这张图在三星平板上可以完整显示出来,为什么...

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

1309. 基本效果已经实现,想用for批量绑定事件 [ 50%]

...nction Haha(obj,yy,times1,alphas,times2) { Tween.to(obj,{y:yy},times1,null,Handler.create(this,function() { Tween.to(obj.loadtext,{alpha:alphas},times2,null,null,0); })); } 2017-06-26 1 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 cai958...

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

1310. 加载.ls场景文件,销毁场景,再加载同一场景,想恢复初始状态,结果报错【附Demo】 [ 50%]

...dChild (laya.core.js:13290)     at Main.Complete3D (Main.ts:48)     at Handler.__proto.runWith (laya.core.js:1400)     at LoaderManager.__proto._createOne (laya.core.js:14594)     at LoaderManager.__proto._create (laya.core.js:14560)     at LoaderManager.__proto.create (laya.core.js:14514)...

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