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

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

271. 用LayaAir引擎解析Tiled Map地图(TypeScript-2D进阶篇(TS)-扩展模块) [ 95%]

...Laya.Browser.width,Laya.Browser.height,Laya.WebGL); //创建TiledMap实例 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(); //创建TiledMap地图 this.tMap.createMap("res/TiledMap/orthogonal.json",viewRect); } } new GameMain...

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

272. 鼠标交互-拖动 [ 95%]

...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { createApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(textur...

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

273. 如何使用3D场景2D人物进行混合开发(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 95%]

...ory=3d&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.pr...

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

274. 混合模式-Lighter [ 95%]

...ePhoenixes(); // 动态背景渲染 evalBgColor(); Laya.timer.frameLoop(1, this, renderBg); } function createPhoenixes() { var scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 加了混合模式的凤凰 var blendedPhoenix = createAnimation(); ble...

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

275. UI-Button [ 95%]

... COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(skins, Handler.create(this, this.onUIAssetsLoaded)); } onUIAssetsLoaded() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya....

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

276. tab 是否可以做到左右滑动切换view呢? [ 95%]

...现。 2016-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown);         this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp);              }     private onMouseDownX : number;     private onMouseDownY :...

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

277. dialog的popup方法不会关闭其他弹窗 [ 95%]

...xtends ui.loginUI { normalDialog: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { this.showDialog("注册功能暂未开放") });  }  showDialog(context: strin...

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

278. 在绘制扇形CD进度条时会在IOS上百分百出现绘制不完全的BUG(有必现Demo) [ 95%]

...在IOS上百分百出现绘制不完全的BUG:如下图     update() { this.updatePowerProgressTest(); } //更新蓄力进度圈 updatePowerProgressTest() { //是否为增加进度条 if (this.isIncPower) { //蓄力速度 this.currentPower += 5; if (this.currentPower >= this.powerTotal) { thi...

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

279. 在wx.request的success回调中写的this,发布后this没有改变为_this(但是fail里面的就自动变了)导致错误!!! [ 95%]

在wx.request的success回调中写的this,发布后this没有改变为_this(但是fail里面的就自动变了)导致错误!!! 求高手告知是否是IDE的BUG,还是代码写的有问题,谢谢啦 附件 : --> 2018-07-11 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

280. 手机调试时http请求错误,返回Request failed Status:0 [ 95%]

...new Laya.HttpRequest(); hr.http.timeout = 5000; hr.on(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Laya.Event.COMPLETE, this, (response)=>{ UIFactory.closeWaitBar(); this.onHttpRequestComplete(response); if(handleOk){ handleOk(response); } }); hr.once(Laya.Event.ERROR, this, (e...

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