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

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

131. 基础文本 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...1.4 脚本控制Text2. 代码创建Text基础文本(Text) Text继承于Sprite,是静态文本的基础组件。这里我们介绍一下Text专属的组件属性。 1. LayaAir IDE中使用Text 1.1 创建Text 如图1-1所示,可以在层级窗口中右键进行创建,也可以从小部件窗...

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

132. Sprite的destroy [ 75%]

Sprite的destroy destroyChildren() { if (this._children) { for (var i = 0, n = this._children.length; i < n; i++) { this._children[0].destroy(true); } } 这几行代码来自laya.core.js的12544行开始的,for循环里的this._children[0]是不是应该是this._children[i]?还是我的使用...

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

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

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

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

134. 创建laya的视图销毁destroy()清除不了 [ 75%]

...图销毁destroy()清除不了。  class Mail2View extends laya.display.Sprite { private display:ui.mail.mail2UI; constructor(){ super(); this.display = new ui.mail.mail2UI(); this.addChild(this.display); } public destroy():void { this.display.destroy(); this.display.removeSelf(); super.destroy(); ...

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

135. 支付宝小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...der.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sprite3D; this.scene3d.addChild(sp3); }); }) Laya.loader.loadPackage("sub2", this.printProgress).then(() => { Laya.loader.load("sub2/Sphere.lh").then((res: any) => { let sp3 = res.create(...

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

136. [LayaAir3]TextInput节点的子节点Sprite为什么在getChildAt中是1的索引而不是0 [ 75%]

[LayaAir3]TextInput节点的子节点Sprite为什么在getChildAt中是1的索引而不是0 在最新的Layaair3中,在TextInput下的子节点Sprite,在TextInput的脚本中,访问getChildAt(0)是Input,而不是Sprite,而Spirit是getChildAt(1)   附件 : --> LayaProject6.zip 2025-03-24 ...

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

137. Laya.Sprite mouseX出错 [ 75%]

Laya.Sprite mouseX出错 2017-12-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞同来自: mouseX不是静态的方法,所以你这样写确实是有问题的,建议你看下Sprite...

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

138. 创建对象时使用wx报错 [ 75%]

...答(最新版本:1.7.16) TS项目使用matter.js库无智能提示 sprite3d怎样使用Laya.Tween.to来做缓动呢?比如position或者scale 微信小游戏如何使用ttf字体? 微信小游戏:HTMLDivElement的使用 LayaAirIDE下如何使用mask? 使用3D时候,Property 'getCompo...

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

139. CommandBuffer_Outline 每次 addCommandBuffer都会永久增加10Gpu,removed掉相机事件也不会减少 [ 75%]

...目标物体添加上描边 */     public AddCommandBuffet_Outline(sprite3D : Laya.Sprite3D): void{         if((sprite3D as Laya.MeshSprite3D) == null || !this.isUseOuline){            // console.log('spreite3D node meshSprite3D is null');           ...

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

140. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 75%]

...时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation++; } //开始碰撞时执行 onTriggerEnter(other: any): void { var owner: Laya.Sprite = this.owner as Laya.Sprite; if (other.label === "buttle") { //碰撞到子弹后,增加积分,播放声音特效 if (t...

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