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

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

21. 资源加载 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

... const { regClass, 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

22. 面板容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

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

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

23. 垂直布局容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 82%]

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

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

24. 场景管理 · LayaAir3.4 · 引擎文档 · LAYABOX [ 81%]

...oyedScenes属性查看还未被销毁的场景列表 */ export class Scene extends Sprite { /**创建后,还未被销毁的场景列表,方便查看还未被销毁的场景列表,方便内存管理,本属性只读,请不要直接修改*/ static readonly unDestroyedScenes: Set<Scene> ...

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

25. 水平布局容器组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 81%]

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

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

26. 单选框组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 81%]

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

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

27. UI运行时 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...

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

28. 关于.ui文件生成的ts类如何正确使用这个.ui皮肤,自动生成的代码有误 [ 80%]

...的界面,比如我写了A.ui文件,自动生成一个ts类,class A extends ui.AUI,但是这个ui命名空间并不存在,如果我手动改成extends Laya.View(.ui文件里用的View标签),那么我如何让这个类去使用这个.ui文件呢?就像eui里指定skin一样。 2018-0...

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

29. 垂直滑动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 79%]

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

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

30. 水平滑动条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 79%]

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

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