大约有 6 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0040 秒)
...hics.drawRect(20, 20, 100, 50, "#ffff00", "#00ff00", 5, false); this.owner.addChild(sp); 示例中的 20,20 是矩形起始点坐标,100是向右的宽度,如果是负数则是向左的宽度。50是向下的高度,如果是负数则是向上的高度。 运行效果: (图2-3) 2.3 用d...
来源: Laya3.0_文档 发布时间: 20240910
...nish(): void { //初始化3D场景 this.scene = (<Scene3D>Laya.stage.addChild(Loader.createNodes("res/threeDimen/scene/TerrainScene/XunLongShi.ls"))); //根据场景中方块生成路径点 this.initPath(this.scene); //获取可行走区域模型 var meshSprite3D: MeshSprite3D = (<MeshSprit...
来源: Laya3.0_文档 发布时间: 20230303
... private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效果如图3-3所示,说明地图已创建成功。 (图3-3) 3.3...
来源: Laya3.0_文档 发布时间: 20240910
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20250214
...(child); this._shurikenParticleSystem.push(child.particleSystem); } } this.addChild(this._particle); this._isInited = true; } //粒子特效播放,由于一个复杂的粒子特效由多个粒子系统组成,此时遍历粒子特效所有粒子系统对象调用play() play(): void { for (var i =...
来源: Laya3.0_文档 发布时间: 20250104
...aterial; //把圆锥形3D节点对象添加到3D场景节点下 this.scene.addChild(cone); //设置随机位置 this.tmpVector.setValue(Math.random() * 6 - 2, 6, Math.random() * 6 - 2); cone.transform.position = this.tmpVector; //为圆锥形3D节点对象创建刚体碰撞器 let _rigidBody = <L...
来源: Laya3.0_文档 发布时间: 20250103