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

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

1951. 当屏幕尺寸,缩放模式,横竖屏 发生改变时会报错Uncaught TypeError: Cannot read property 'length' of null [ 74%]

...改为public function get numChildren():int {             trace(this);             if (!this._childs){                 return 0;             }             return this._childs.length;         }可解决 2017-08-29 1 0 分享 微博 QZONE 微信 18...

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

1952. 说的的新版本更新的问题呢 [ 74%]

...__substr:function(ofs,sz){return arguments.length==1?Laya.__presubstr.call(this,ofs):Laya.__presubstr.call(this,ofs,sz>0?sz:(this.length+sz));},   String.prototype.substr=Laya.__substr; 请你们自己检测一下   我举个例子:   let color='#FFFFFF'   原生: color.substr(0,0) -> '...

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

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

...scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.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; mLabel...

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

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

...内容也是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.create, this.spr); ...

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

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

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

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

1956. 启用版本管理后,加载的资源很奇怪的在正确的路径后面又加了一次路径 [ 74%]

...oto", "protos/gm.proto", "protos/samplegame.proto", ];   Laya.loader.load(this._proto_files,Laya.Handler.create(this,this.OnProtoLoaded),null, Laya.Loader.TEXT);     打包的时候在release/web下面有了protos/loginxxxxxxxx.proto这样的文件 然后运行的时候,报了这样的错 GET h...

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

1957. 3D基础显示对象 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...hongMaterial(); boxRender.sharedMaterial = boxMaterial; // 添加到场景 this.scene.addChild(box); // 设置位置 box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); /* 球体 */ let sphere = new Laya.Sprite3D; let sphereMesh ...

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

1958. 滤镜效果 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

...a.ColorFilter = new Laya.ColorFilter(); //给Image组件添加颜色滤镜 this.img.filters = [colorFilter]; //设置滤镜颜色 colorFilter.color(0.5, 0.5, 0.5, 1); //设置滤镜亮度 colorFilter.adjustBrightness(-50); //设置滤镜对比度 colorFilter.adjustContrast(8); //设置滤镜饱和...

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

1959. TiledMap 45度地图块渲染顺序问题 [ 74%]

...8-03-21 0 0 分享 微博 QZONE 微信 cheneboy 赞同来自: 可以了   this.tiledMap.createMap("res/tiled/green.json", new Rectangle(0, 0, 1120, 860), new Handler(this, this.completeHandler),null,new Point(1120,860)); 最后那个参数new Point(1120,860),其实是地图的分块渲染的大小...

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

1960. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 74%]

...   log = Log.getLogger("Game");             }               this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStageHandler);           }           private function onAddedToStageHandler(evt:Event):void         {             this.removeEventListener(Event.ADDED_TO...

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