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

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

21. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 ...

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

22. HTTP通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

... this.text.align = "center"; this.text.y = 20; this.text.centerX = 0; this.owner.addChild(this.text); } /** * 发起HTTP连接请求 */ private connect(): void { //创建HttpRequest对象 this.hr = new HttpRequest(); //请求响应的进度改变时触发 this.hr.on(Event.PROGRESS, this, this.onHttp...

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

23. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 75%]

...rue;         this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D;         this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text;         this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCo...

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

24. 发射射线检测不到,物体有包围盒 [ 75%]

...了Scene3d             scene3d.name = 'good';             self.owner.addChild(scene3d);              var lv = scene3d.getChildByName("--- GAMEPLAY ---").getChildByName("Levels Parent");              // Laya.Sprite3D.load("res/prefabs/Conventional/prefabs.lh", Laya.Handler.c...

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

25. 取色器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...eHandler = new Laya.Handler(this, this.onChangeColor, [colorPicker]); this.owner.addChild(colorPicker); this.onChangeColor(colorPicker); } private onChangeColor(colorPicker: Laya.ColorPicker, e: any = null): void { console.log(colorPicker.selectedColor); } } 运行效果如下动图所示: (动...

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

26. 显示文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...aya; @regClass() export class LabelControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.Label } ) public lab: Laya.Label; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake...

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

27. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...e2D下 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...

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

28. UI运行时 · LayaAir3.3 · 引擎文档 · LAYABOX [ 74%]

... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...

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

29. [LayaAir3]关于laya更新到3.1出现射线检测不到的情况 [ 74%]

...enemyHit);                     var _enemy=this.enemyHit.collider.owner as Laya.Sprite3D;                     if(_enemy.layer==6)                     {                         if(this.enemy!=null)return                         console.log("检测...

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

30. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 73%]

...or3(0,0,0);     }     onStart(){         this.scene = this.owner.parent;         this.text = this.scene.parent.getChildByName("ceshi");         this.camera = this.scene.getChildByName("camera");     }     onUpdate(){         let touchCount = this.scene...

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