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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0063 秒)

351. Dragonbones龙骨动画 播放不同动作出现闪烁 混乱 [ 87%]

... load(aniUrl: string,emoji?:string,complete?:Handler):void{ if (emoji) { this.emoji=emoji; } if (complete) { this.completeHandler = complete; } this.aniUrl = aniUrl; this.templet = new Templet(); this.templet.on(Event.COMPLETE, this, this.parseComplete); // this.templet.on(Event.ERROR, this, this.on...

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

352. Laya.loader.load 教程代码出错 [ 87%]

...      }             Laya.loader.load(arr,Handler.create(this,LoadComplated));         }         private function LoadComplated(e:*=null):void         {             Laya.stage.addChild(img);             img.on("click",this,OnImgClick);...

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

353. 关于protobuf反序化的问题,求大神解答~~~ [ 87%]

...ed string uid = 1; required string token = 2; } js的代码: var proto = this.ProtoBuf.loadProtoFile("user_login.proto"); var Build = proto.build("user_login_pack"); var login = new Build(); login.uid = '100001'; login.token = "xxxxx"; var buffer = login.toArrayBuffer() this.socket.send(buffer); ...

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

354. 屏幕适配-缩放-Show All [ 87%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

来源: Laya_示例 发布时间: 20251130

355. 屏幕适配-缩放-Extract Fit [ 87%]

...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

来源: Laya_示例 发布时间: 20251130

356. 【简单跑酷--JS版】---Lv.4 添加玩家 [ 87%]

...}); //加载图集资源 Laya.loader.load(asset, laya.utils.Handler.create(this, onLoaded), laya.utils.Handler.create(this, onLoading, null, false)); 嗯 加载改好了 我们先来测试一下 图片是否能拿到 我们在onLoaded方法里面 写一点测试代码 如下   function onLoaded(){ ...

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

357. 最新版本绘制100x100个sprite ios不能显示 [ 87%]

...制100x100个sprite ios不能显示 /* 游戏地图 */ function GameMap(){ this.MapRowNum = 100; this.MapColNum = 100; GameMap.super(this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new laya.display.Sprit...

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

358. 加载-销毁Texture使用的图片资源 [ 87%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this....

来源: Laya2.0_示例 发布时间: 20251130

359. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 87%]

... _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); } public SetM...

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

360. list中加的button不能接收点击事件 求一个list中加button的demo [ 87%]

...  }         let list = new Laya.List;         list.width = this.itemList.width;         list.height = this.itemList.height;         list.x = this.itemList.x;         list.y = this.itemList.y;         list.spaceY = 12;         list.vScrollBarSkin = ""...

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