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

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

401. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 80%]

... this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya....

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

402. 绘制圆形与扇形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 80%]

...      this.sp = new Sprite();             Laya.stage.addChild(this.sp);             //画圆             this.sp.graphics.drawCircle(80,80,50,"#ff0000");            }     } } new laya.Sprite_DrawShapes(); ``` 代码运行效果如下图所...

来源: Laya2.0_文档 发布时间: 20210715

403. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 80%]

...; soundButton.y = (Laya.stage.height - soundButton.height) / 2; Laya.stage.addChild(soundButton); //创建一个Sprite充当音乐播放按钮 var musicButton = createButton("播放音乐"); musicButton.x = soundButton.x + gap + soundButton.width; musicButton.y = soundButton.y; Laya.stage.addChild(m...

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

404. "Cannot read property 'addChild' of undefined" [ 80%]

"Cannot read property 'addChild' of undefined" 第一个方法 是button 响应时间 添加一个Prick 对象 (没有问题) 第二个方法 是通过  viruses.forEach(this.drawVirus);  添加 Prick  (报错 map 没有addChild 方法) 什么鬼?   附件 : --> 2017-05-16 添加评论...

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

405. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 80%]

...createLightOccluder(): void { this.lightOccluder.pos(233, 265); this.owner.addChild(this.lightOccluder); let lightOccluderComponent = this.lightOccluder.addComponent(Laya.LightOccluder2D); lightOccluderComponent.canInLight = true; lightOccluderComponent.outside = true; let poly: Laya.PolygonPoint2D ...

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

406. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 80%]

...wScene = <Laya.Scene3D>Util3d.getRes(this.sMapRes, false) Laya.stage.addChild(pNewScene); Util3d.getChildByPath(pNewScene, "Main Camera").active = false; let pBull = <Laya.Sprite3D>Util3d.getRes(this.sBullRes) let pEnemy = <Laya.Sprite3D>Util3d.getRes(this.sEnemyRes) pNewScene.addC...

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

407. UI-Input [ 80%]

...Arial"; ti.fontSize = 30; ti.bold = true; ti.color = "#606368"; Laya.stage.addChild(ti); return ti; } } } new laya.UI_Input();package { import laya.display.Stage; import laya.ui.TextInput; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Input { private const SPACING:int = 100; pr...

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

408. 输入设备-地图 [ 80%]

...el(label); } function createInfoText() { infoText = new Text(); Laya.stage.addChild(infoText); infoText.fontSize = 50; infoText.color = "#FFFFFF"; infoText.size(Laya.stage.width, Laya.stage.height); } // 更新设备位置 function updatePosition(p) { // 转换为百度地图坐标 var point = new B...

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

409. HScrollBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 80%]

....changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(this.hScrollBar); //创建提示信息 createPromptText(this.hScrollBar) } /***创建提示信息***/ function createPromptText(scrollBar) { //实例化提示信息 this.promptText = new Text(); //提示框字体 thi...

来源: Laya2.0_文档 发布时间: 20210714

410. Laya 绑定显示内容到骨骼动画 [ 80%]

...List.indexOf(source); if(index<0){ this.__bindList.push(source); } this.addChild(source); this.timer.frameLoop(1,this,this.__updateBinds); }  unbind(source:BindSource):void{ let index:number=this.__bindList.indexOf(source); if(index<0){ throw new Error("找不到要删除的绑定内容");...

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