大约有 4 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0021 秒)
...畴。 1.4 节点 在 LayaAir 引擎中,Node(节点)类是所有可加入显示列表对象的基类。2D 的基础精灵 Sprite 和 3D 的基础精灵 Sprite3D 都继承自 Node。不仅如此,所有继承自 Node 的子类或孙类对象,统称为“节点”,如:Sprite 节点、Imag...
来源: Laya3.0_文档 发布时间: 20251010
...最上面,所以设置了zIndex值为一个正数,但当这个预制体加入场景后,如果其它节点没有设置zIndex属性,那这个节点就会显示在所有节点的上层,而不是只在这个预制体内容的最上层,这显然不符合预期。 为了解决这个问题,Sp...
来源: Laya3.0_文档 发布时间: 20251010
...使用 在LayaAir3-IDE中新建一个脚本,添加到Scene2D节点后,加入下述代码,实现一个2D精灵光的效果: const { regClass, property } = Laya; @regClass() export class SpriteLight extends Laya.Script { @property({type: Laya.Sprite}) private spriteLight: Laya.Sprite; @propert...
来源: Laya3.0_文档 发布时间: 20251010
...个新场景,使用加载页面,那么就先定义一个脚本代码,加入可能拖入loading场景的Laya.Prefab属性,代码如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Prefa...
来源: Laya3.0_文档 发布时间: 20251010