大约有 3,124 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0108 秒)
...分; 打开界底层是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
... = 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
... 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
...码设置示例如下: 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
...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
...现脚本控制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
...。示例代码如下: 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
...。示例代码如下: 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
...不要让类相互继承,然后又相互引用就解决了,比如 export default class A{ //public instance:B 这种就是类相互继承,然后又相互引用,改为: public instance:any } export default class B extends A{ } 2024-12-16 1 0 分享 微博 QZONE 微信 正...
来源: Laya_社区 发布时间: 20241209
...一个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