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

大约有 4,034 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0079 秒)

371. tree异步选中问题 [ 94%]

...:Cell = e.target.parent as Cell; if (item.dataSource.isOpen == true) { if (this.selectedIndex == -1) { this.selectedIndex = index; } else { if (this.selectedIndex < index) { this.listUI.typeTree.setItemState(this.selectedIndex, false); this.selectedIndex = index - this.selectedNodes; } else { thi...

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

372. 监听按键事件怎么写呀,TS的 [ 94%]

...yCode);             if(e.keyCode==37){//左            this.hero.pos(this.hero.x-100,this.hero.y);                   }else if(e.keyCode==39){//右            this.hero.pos(this.hero.x+100,this.hero.y);        }else if(e.keyCode==38){//上     ...

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

373. 事件管理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 94%]

...ble(): void { console.log("IndexRT onEnable") //侦听ui按钮点击事件 this.uiBtn.on(Laya.Event.CLICK, this, () => { //点击后,打开UI场景示例 console.log("uiBtn"); Laya.Scene.open("scenes/UiMain.ls"); }); //侦听物理按钮点击事件 this.phyBtn.on(Laya.Event.CLICK, this, () =&g...

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

374. 移动控制。 [ 94%]

...oller.js   下放开注释就发生错误。       //         this.owner.transform.localRotationEulerX=this.hitResult1.collider.owner.transform.localRotationEulerX;        //         this.rotation=this.owner.transform.localRotationEuler;         //     }else if...

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

375. 官方视频教程中飞机大战 "this.addChild is not a function" [ 94%]

官方视频教程中飞机大战 "this.addChild is not a function" IDE Layabox1.7.20.2 beta 版 src/Game.js//var WebGL = laya.webgl.WebGL; //Laya.init(480, 852, WebGL); var Game = (function(){ (function Game(){ Laya.init(480,852); this.bg = BackGround(); Laya.stage.addChild(this.bg); })(); })(); s...

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

376. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 94%]

...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.assets = ["resources/res/ui/dialog (1).png", "resources/res/ui/close.png"]; Laya.loader.load(this.assets).then( ()=>{ this.onSkinLoadComplete(); } ); } private onSkinLoadComplete(e: any = null): void { this.dialog = new...

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

377. 2.3.0beta 各种bug [ 94%]

...    }),如果有  async(){ await xxxx }会报这个错误 TS2354: [31mThis syntax requires an imported helper but module 'tslib' cannot be found.   一、万年没修成功过的自定义导出类 自动添加Laya前缀问题 二、切换类库依旧报错 三、拖尾依然没提供重置...

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

378. this.animation.loadAtlas 加载失败 [ 94%]

IDE相关问题 this.animation.loadAtlas 加载失败 this.animation.loadAtlas 加载失败什么捕获并处理,还有获取改animation的内存大小 this.animation.loadAtlas(this.resUrl, Laya.Handler.create(this, this.loadCompleted, [completeFun]), this.resUrl);   2017-09-05 添加评论 免...

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

379. tiledMap问题,getTileProperties获取地图属性不能获取到 [ 94%]

...  __proto.getTileProperties=function(index,id,name){         if (this._tileProperties[index] && this._tileProperties[index][id]){             return this._tileProperties[index][id][name];         }         return null;     }     import { ui } from ...

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

380. 屏幕适配-缩放-No Border [ 94%]

...ya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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