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

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

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

...EARFLAG_SKY; this.m_sceneCamera.addComponent(CameraMoveScript); this.stage.addChild(this.m_scene); this.m_scene.addChild(this.m_sceneCamera); 在destory的时候 this.stage.removeChild(this.m_scene); this.m_sceneCamera.removeAllComponent(); this.m_scene.destroy(); this.m_scene = null; 只会这个Ca...

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

252. Panel的滚动条皮肤问题 [ 85%]

...'images/scrollbar.png'; panel.vScrollBar.elasticDistance = 100; Laya.stage.addChild(panel); // 0为说明 1为排行 内容部分 switch(num){ case 0: panel.addChild(_this.descriptionContent()); // 说明 内容 break; case 1: panel.addChild(_this.rankingContent()); // 排行榜 break; } }     附...

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

253. UI-Tab [ 85%]

...edIndex); tab.selectHandler = new Handler(this, this.onSelect); Laya.stage.addChild(tab); return tab; } onSelect(index) { console.log("当前选择的标签页索引为 " + index); } } new UI_Tab();module laya { import Stage = Laya.Stage; import Tab = Laya.Tab; import Handler = Laya.Handler; import ...

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

254. 使用IDE制作的动画在pc模拟器播放OK在手机端不显示 [ 85%]

...ruto2.ani"); //添加到舞台 var apesCtn = new Laya.Sprite(); Laya.stage.addChild(apesCtn); var _this = this; this.tl.on(this.Event.COMPLETE,this,function(){ _this.tl.stop(); }) console.log(this.tl) this.tl.interval = 1000 / 60; // this.tl.play(); apesCtn.addChild(this.tl); apesCtn.height = 1500; ...

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

255. 自定义shader-简单shader [ 85%]

....screenMode = Laya.Stage.SCREEN_NONE; initShader(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.5, 1.5)); camera.addComponent(CameraMoveScript); var layaMonkey = scene.addChild(new Laya...

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

256. 这个圆形遮罩问题怎么解决 [ 85%]

...罩问题怎么解决 我的代码时这样的 var sp = new Sprite(); this.addChild(sp);         this.img = new Sprite(); sp.graphics.drawCircle(0,0,50,"transparent");         this.addChild(this.img); this.img.mark = sp;   我看被人也都是这样写的不知道为什么我的达...

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

257. 这种进度条怎么实现? [ 85%]

...is.CIRCLE_WIDTH) >> 1, (this.DEF_SIZE - 20) >> 1, "#fff") this.addChild(this.$circleSprite) this.start() } public start() { this.timerLoop(2, this, this.draw) } public draw() { if (this.startY >= 270) { this.clearTimer(this, this.draw) } this.startY++ this.graphics.clear() this.graphi...

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

258. 2D物理-碰撞过滤器 [ 85%]

...; } } private function createHouse() { var house= new Sprite(); Laya.stage.addChild(house); var rigidbody: RigidBody = house.addComponent(RigidBody); rigidbody.type = "static"; var chainCollider: ChainCollider = house.addComponent(ChainCollider); chainCollider.loop = true; chainCollider.points = "60...

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

259. 3D场景销毁后,仍有引用存在,内存中场景及引用其的对象无法销毁 [ 85%]

...引用其的对象无法销毁         this.scene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D;          this.camera = new Laya.Camera();         this.camera.transform.translate(new Laya.Vector3(0, 2, 5));         this.camera.transform.rotate(...

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

260. 区块地图-等角地图 [ 85%]

...ite.graphics.drawLine(radiusX, radiusY, 0, radiusY * 2, color); Laya.stage.addChild(this.sprite); } } new TiledMap_IsometricWorld();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; impor...

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