大约有 148 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0031 秒)
...,例如,给Sprite添加纹理等,示例代码如下所示: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImag...
来源: Laya3.0_文档 发布时间: 20251010
...所示。 (动图1-3) (动图1-4) 1.3 脚本控制TextArea const { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** ...
来源: Laya3.0_文档 发布时间: 20251010
...出生点与传送点)等需求。 代码设置示例如下: const { regClass, property } = Laya; @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组...
来源: Laya3.0_文档 发布时间: 20251010
...。需要添加如下的示例代码,实现脚本控制Panel: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Panel }) public panel: Laya.Panel; //组件被激活后执行,此时所有节点和组件均已创建完毕,此...
来源: Laya3.0_文档 发布时间: 20251010
...者可以在VBox下添加一些子节点。示例代码如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.VBox }) public vbox: Laya.VBox; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法...
来源: Laya3.0_文档 发布时间: 20251010
...者可以在HBox下添加一些子节点。示例代码如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.HBox }) public hbox: Laya.HBox; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法...
来源: Laya3.0_文档 发布时间: 20251010
...提交 4 个回复 老衲当时慌了 赞同来自: ggxxyy Laya.ClassUtils.regClass("laya.effect.ColorFilterSetter", Laya.ColorFilterSetter); Laya.ClassUtils.regClass("laya.effect.GlowFilterSetter", Laya.GlowFilterSetter); Laya.ClassUtils.regClass("laya.effect.BlurFilterSetter", Laya.BlurFilterSette...
来源: Laya_社区 发布时间: 20191015
...。需要添加如下的示例代码,实现脚本控制Radio: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Radio }) public radio: Laya.Radio; //组件被激活后执行,此时所有节点和组件均已创建完毕,此...
来源: Laya3.0_文档 发布时间: 20251010
...Name:String):*[static] 根据名称创建 Class 实例。 ClassUtils getRegClass(className:String):*[static] 返回注册 Class 映射。 ClassUtils regClass(className:String, classDef:*):void[static] 注册 Class 映射。 ClassUtilsProperty Detail_classMappropertypublic static var _classMap:...
来源: laya_api 发布时间: 20170929
...需要添加如下的示例代码,实现脚本控制VSlider: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({type:Laya.VSlider}) public vslider: Laya.VSlider; //组件被激活后执行,此时所有节点和组件均已创建完毕,此...
来源: Laya3.0_文档 发布时间: 20251010