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

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

361. 有关Laya3D碰撞检测疑问 [ 94%]

...scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene;  this._outHitAllInfo = new Array<Laya.RaycastHit>();  //初始化照相机 this.camera = scene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera; this.camera.transform.translate(new Laya.Vector3(0, 2, 5)); this.came...

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

362. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 94%]

...) export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需要用到该Dialog的场景管关联起来。回到初始场景Scene,在S...

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

363. LayaAirID 打包app测试 apk无法开启webgl。用浏览器扫码进入就没问题 [ 94%]

...示对象 *@param index */ __proto.showDisplayByIndex=function(index){ if (this._replaceDic[index]) index=this._replaceDic[index]; if (this.currSlotData && index >-1 && index < this.currSlotData.displayArr.length){ this.displayIndex=index; this.currDisplayData=this.currSlotData...

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

364. CameraMoveScript,父对象Camera移除removeAllComponent后,还会继续获取鼠标事件 [ 94%]

...对象Camera移除removeAllComponent后,还会继续获取鼠标事件 this.m_scene = new Laya.Scene(); this.m_sceneCamera = new Laya.Camera(0, 0.1, 100); this.m_sceneCamera.transform.translate(new Laya.Vector3(-40, 50, 60)); this.m_sceneCamera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; this.m_sce...

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

365. 在一个矩形之上画另一个矩形,只显示一个矩形 [ 94%]

...宽 var boxWidth = 440; //串盒子的高 var boxHeight = 500; //串盒子 this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.graphics.drawRect( this.chuanBox.x, this.chuanBox.y, this.chuanBox...

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

366. 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

367. 事件管理 · LayaAir3.0文档 · 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_文档 发布时间: 20230729

368. 监听按键事件怎么写呀,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

369. 移动控制。 [ 94%]

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

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

370. 官方视频教程中飞机大战 "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