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

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

71. LayaBox HelloWorld实战 [ 66%]

...话框,对话框里面展示 Hello World!export default class HelloWorld extends Laya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChil...

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

72. 水平滚动条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.HScrollBar }) public hscroll: Laya.HScrollBar; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hscroll.sk...

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

73. 垂直滚动条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.VScrollBar }) public vscroll: Laya.VScrollBar; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vscroll.sk...

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

74. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property( { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwak...

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

75. 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? [ 65%]

...nent3D</code> 类用于创建组件的父类。 */ class Component3D extends laya.events.EventDispatcher implements laya.d3.core.render.IUpdate { protected static _uniqueIDCounter: number; protected _id: number; protected _cachedOwnerLayerMask: number; protected _cachedOwnerEnable: boolean; pr...

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

76. tsc编译报错 [ 65%]

...题! 2017-03-01 0 0 分享 微博 QZONE 微信 jiye 赞同来自: 我在extends 后面多写了class 所以报了这个诡异的错 @xiaosong 2017-03-01 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 jiye 相关问题 Layabox 2.0 bate5...

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

77. Runtime照着视频做运行不了,求解 [ 64%]

...time照着视频做运行不了,求解 export default class TextInputExt extends Laya.TextInput{ constructor() { super(); } } 脚拖到runtime那里,结果运行提示找不到脚本 附件 : --> 2019-01-21 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

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

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

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

79. 2.0下资源加载和销毁内存问题 [ 64%]

...片大小为640*1038,900K    先创建一个img实例 class bitmapimg extends Laya.Image //2.0版本 这里区别为export default class bitmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandler(url:string):v...

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

80. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.o...

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