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

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

151. LayaBox进阶之UI管理类 [ 64%]

...分; 打开界底层是addChild打开的;     新建一个UIManagerexport class UIManager { private mainContent: Laya.Sprite; private scene: GameScence; private uiList:any; constructor() { this.mainContent = new Laya.Sprite(); this.uiList = ; } }mainContent 为默认添加到的层级, GameS...

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

152. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 64%]

... = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Main { private ApePath: string = "../../res/apes/monkey2.png"; private apeTexture: Texture; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); L...

来源: Laya2.0_文档 发布时间: 20210715

153. 多行输入文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

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

154. 角色控制器 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

...码设置示例如下: const { regClass, property } = Laya; @regClass() export default class DirectMove extends Laya.Script { declare owner: Laya.Sprite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this...

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

155. 加载.lh文件 运行后黑屏 无法显示 [ 64%]

...andler.create(this, this.onComplete));         Laya.loader.create("Export/LayaScene_JJF/Conventional/JJF.lh", Laya.Handler.create(this, this.onComplete));     }     public onComplete():void {     //创建场景     var scene = Laya.stage.addChild(new Laya.Scene3D());     ...

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

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

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

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

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

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

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

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

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

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

159. [LayaAirIDE3]发布后的bundle.js,类的定义顺序错误 [ 63%]

...不要让类相互继承,然后又相互引用就解决了,比如   export default class A{   //public instance:B  这种就是类相互继承,然后又相互引用,改为: public instance:any   }   export default class B extends A{   } 2024-12-16 1 0 分享 微博 QZONE 微信 正...

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

160. 2.0版本可用的CameraMoveScript.ts [ 63%]

...一个2.0,跟示例里效果一样的文件:   /** * ... * @author */ export class CameraMoveScript extends Laya.Script {      /** @private */     protected _tempVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;   ...

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