大约有 41 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0029 秒)
...位置点数据): draw() { const pp = this.owner.getComponent(Laya.PolygonCollider).points; let points = this.pointS_to_pointA(pp) let owner: Laya.Sprite = this.owner as Laya.Sprite const ctx = owner.graphics; ...
来源: Laya_社区 发布时间: 20200428
...llider,使用代码更改属性points,则报错 var chains=this.sprite.getComponent(Laya.ChainCollider); (chains as Laya.ChainCollider).points="25,25,50,50"; 2018-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个...
来源: Laya_社区 发布时间: 20181128
...nsform.localPosition = new Laya.Vector3(0,5,5); let p3dRenderer = this.p3d.getComponent(Laya.ShurikenParticleRenderer); p3dRenderer.particleSystem.simulationSpeed = 10; } 通过暴露@property( { type :Laya.Sprite3D } )节点类型属性,来拖入particle节点,可以获得particle节点对象...
来源: Laya3.0_文档 发布时间: 20251010
... console.log(this.owner.name) var skin = this.owner.getComponent(Laya.SkinnedMeshRenderer); let mat = skin.material; mat.stencilTest = Laya.RenderState.STENCILTEST_NOTEQUAL; mat.stencilWrite = true; mat.stencilRef = 2; ...
来源: Laya_社区 发布时间: 20231228
... // 文本显示当前时间 onAwake(): void { this.lightComp = this.owner.getComponent(Laya.DirectionLight2D); // 初始化文本组件 this.displayText = new Laya.Text(); this.displayText.color = "#ffffff"; this.displayText.font = "Arial"; this.displayText.fontSize = 24; this.displayText.bold = tr...
来源: Laya3.0_文档 发布时间: 20251010
...long to other node."; if (comp.isSingleton && this.getComponent((comp).constructor)) throw "Node:the component is singleton,can't add the second one."; this._addComponentInstance(comp); return comp; } 暂时...
来源: Laya_社区 发布时间: 20190609
...0,0,100,0)确实不会报错,但如果是已存在,比如先设置sp.getComponent(ChainCollider).points = "25,25,50,50";运行后,再改变值时(如果一次运行中连续赋值2次,是不会报错的,必须执行再赋值),就会报错。 如下使用2d示例项目中代码,改写...
来源: Laya_社区 发布时间: 20181130
...是继承Laya.Dialog的,无法像Laya.scene那样加控制脚本,this.getComponent(xx),取不到控制类,何解?
来源: Laya_社区 发布时间: 20181211
...此方法只执行一次 onAwake(): void { this.light1Render = this.light1.getComponent(Laya.FreeformLight2D); this.mesh1Render = this.mesh1.getComponent(Laya.Mesh2DRender); this.mesh2Render = this.mesh2.getComponent(Laya.Mesh2DRender); //设置mesh1位于0层(Default层) this.mesh1Render.layer ...
来源: Laya3.0_文档 发布时间: 20251010
...ake(): void { // 获取 FreeformLight2D 组件 this.lightComp = this.owner.getComponent(Laya.FreeformLight2D); //灯光的顶点通常建议是在IDE中可视化配置,这里是为了演示如何通过代码动态设置顶点数据,方便动态调整灯光形状的需求。 /**设置自由光的...
来源: Laya3.0_文档 发布时间: 20251010