大约有 394 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0047 秒)
...ends MainBase { private _animator: Laya.Animator; private _isRun: boolean; onAwake() { console.log("Game start"); //加载指定的模型预制体,并添加到Scene3D场景内 Laya.loader.load("girl/girl.lh").then(res => { let girl : Laya.Sprite3D = res.create(); this.scene3D.addChild(girl); //...
来源: Laya3.0_文档 发布时间: 20240910
...normalizedViewportPointToRay off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once recoverRenderContext3D removeAllLayers removeChild removeChildAt removeChildByName removeChildren removeCommandBuffer removeCommandBuffers removeLayer removeSelf render replaceChild r...
来源: Laya3.0_api 发布时间: 20231115
...normalizedViewportPointToRay off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once recoverRenderContext3D removeAllLayers removeChild removeChildAt removeChildByName removeChildren removeCommandBuffer removeCommandBuffers removeLayer removeSelf render replaceChild r...
来源: Laya3.0_api 发布时间: 20231115
...: 2023-07-17 17:12 浏览: 3508 关注: 3 人 逸辰 • 2023-07-19 22:52 onAwake(): void { Laya.loader.load( //先加载本场景要用的 ["resources/UI/image.png", "resources/UI/progress.png", "resources/UI/progress$bar.png","resources/UI/images/dsgame/banner2.j...
来源: Laya_社区 发布时间: 20230713
...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.light1Render = this.light1.getComponent(Laya.FreeformLight2D); this.mesh1Render = this.mesh1.getComponent(Laya.Mesh2DRender); this.mesh2Render = this.mesh2.getComponent(Laya.Mesh2DRender); //设置mesh1...
来源: Laya3.0_文档 发布时间: 20250214
...时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() => { Laya.loader.load("sub1/Cube.lh").then((res: Laya.PrefabImpl) => { let sp3: Laya.Sprite3D = res.create() as Laya.Sp...
来源: Laya3.0_文档 发布时间: 20250103
...------- | ------------------------------------------------------------ | | onAwake | 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只会执行一次 | | onEnable | 组件被启用后执行,比如,节点被添加到舞台后执行 | | onStart | 在第1次执...
来源: Laya2.0_文档 发布时间: 20210715
...,如图4-3所示。 (图4-3) 进入vscode编码工具后,我们在onAwake生命周期方法里,添加第一行代码,打印"Hello, World!",如图4-4所示, (图4-4) 回到LayaAir-IDE中,运行查看控制台,如动图4-5所示,可以看到打印了日志。 (动图4-5) ...
来源: Laya3.0_文档 发布时间: 20250103
...ss, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面板 } } 发布后,...
来源: Laya3.0_文档 发布时间: 20250103
...一个 PixelLineSprite3D 对象的网格数据设置成像素线数据: onAwake(): void { /* 创建球体 */ let sphere = new Laya.Sprite3D; let sphereMesh = sphere.addComponent(Laya.MeshFilter); sphereMesh.sharedMesh = Laya.PrimitiveMesh.createSphere(0.25, 20, 20); let sphereRender = sphere.addCo...
来源: Laya3.0_文档 发布时间: 20250103