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

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

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

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

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

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

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

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

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

...如下:   //2.0版本区别为这里需要先import bitmapimg from "./script/bitmapimg "; private flag:boolean = false;     private bt:bitmapimg;     private oldurl:string="" /**此处省略btn创建*/ private onClick():void     { if(this.flag==false){             let url:...

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

74. 视频 · LayaAir3.3 · 引擎文档 · LAYABOX [ 68%]

...s, property } = Laya; /** * 使用视频纹理 */ @regClass() export class Script extends Laya.Script { declare owner: Laya.Sprite3D; @property(Laya.Scene3D) private scene: Laya.Scene3D; private videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场...

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

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

...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

76. Laya中的宏编译要怎么用啊 [ 67%]

... flash模式下用 /*[IF-FLASH]trace("layabox")*/ h5模式下用 //[IF-SCRIPT]alert("layabox") 区域编译宏,只会在h5模式下生效 /*[IF-SCRIPT-BEGIN]trace("hello-h5")[IF-SCRIPT-END]*/ //代码直译方法,直接调用h5的方法 __JS__("alert(100)");//直译的意思就是括号...

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

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

...来自: 可爱又善良的我 唉,坑太多了,原来要在src下建个script目录,然后将runtime脚本放在里面就正常了,好让人无语,不知道是不是2.0的BUG 2019-01-21 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发...

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

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

...ass, 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. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

...位置。 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(thi...

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

80. 编辑模式下的赋值不保留? [ 65%]

...25 14:56 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在工程 Scenes...

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