大约有 277 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0045 秒)
...继承A.scene的页面UI类,如果是非分离模式,则可继承Laya.Script类;然后在编辑模式下拖动,若是分离模式,则将A.ts拖到A.scene的runtime里,若是非分离模式,则把A.ts拖到A.scene的层级管理器里,让它变成A.scene的顶层子元素(子UI的...
来源: Laya_社区 发布时间: 20181008
...Clip: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Clip }) public clip: Laya.Clip; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.clip.pos(Laya.stag...
来源: Laya3.0_文档 发布时间: 20251010
...数据源。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array&...
来源: Laya3.0_文档 发布时间: 20251010
...a2.0 编辑器不显示父类变量 举个粒子 class Parent extends Laya.Script{ /** @prop {name:name, type:string}*/ public name; } class Child extends Parent{} 在编辑器中给对象挂child脚本,并没有显示父类的name对象。 2018-12-13 添加评论 免费帖 --> 分享 微博 QZONE...
来源: Laya_社区 发布时间: 20181213
...Radio: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Radio }) public radio: Laya.Radio; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radio.skin = "...
来源: Laya3.0_文档 发布时间: 20251010
...物体挂在脚本的时候 比如有个脚本是: class Test extends Laya.Script3D{ } 如xxx是一个3D节点,代码里执行: let script:Test = xxx.addComponent(Test); 在web端没问题,在微信开发者工具里运行报错,已上传Demo项目 附件 : --> IdleDemo.zip 2020-03-09 ...
来源: Laya_社区 发布时间: 20200309
...Class, property } = Laya; @regClass() export class LoaderDemo extends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /**加载并...
来源: Laya3.0_文档 发布时间: 20251010
...ntClip: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property( { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一...
来源: Laya3.0_文档 发布时间: 20251010
LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 .script和.prop脚本结合IDE在代码层的使用方式 2016-10-14 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: SONIC3D...
来源: Laya_社区 发布时间: 20161014
...& (Laya.Stat.loopCount > mouseTouch._pressedLoopCount)){ var pressedScripts=pressedSprite._scripts; if (pressedScripts){ for (j=0,m=pressedScripts.length;j < m;j++) pressedScripts[j].onMouseDrag(); } }; var touchSprite=mouseTouch.sprite; if (touchSprite){ var scripts=touchSprite._scripts; ...
来源: Laya_社区 发布时间: 20200119