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

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

211. Spine骨骼动画 · LayaAir3文档 · LAYABOX [ 53%]

...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { //加载Spine动画资源 Laya.loader.load("resources/boy/spineboy-pma.skel").then(() => { //添加spine组件 this.spine = this.sprite.addComponent(Laya.Spine2DRenderNode); this.spine.source = "resources/b...

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

212. 设置后box2d 的 worldRoot 后平移场景 物理世界原地不动 [ 53%]

...信 Ace1024 赞同来自: 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate()...

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

213. 我竟然被射线检测这个小功能给难了一天了 [ 53%]

...itInfo:Laya.HitResult=new Laya.HitResult() physics:Laya.PhysicsSimulation; onAwake():void{ this.camera = this.owner.getChildByName("Main Camera") as Laya.Camera; let scene: Laya.Scene3D = this.owner.scene as Laya.Scene3D;   this.physics=scene.physicsSimulation;     console.log("相机位置",(thi...

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

214. laya.d3.core.light.DirectionLight_API3.0 [ 53%]

...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce instantiate load Constructors constructor new Directi...

来源: Laya3.0_api 发布时间: 20231115

215. [LayaAir3]如何在3D场景添加文字呢 [ 52%]

...ab 的根节点.   export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { let sprite3d: Laya.Sprite3D = this.scene3D.getChildByName("m_Sprite3D"); let ui3d: Laya.UI3D = sprite3d.getComponent(Laya.UI3D); let ui3d_root: Laya.Sprite = ui3d.sprite; console.log("ui3d_root", ui3d_root);...

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

216. laya.display.Node [ 52%]

...ouseEnabled=false,则停止设置父节点mouseEnabled属性)。 Node  onAwake():void 组件被激活后执行,此时所有节点和组件均已创建完毕,次方法只执行一次 此方法为虚方法,使用时重写覆盖即可 Node  once(type:String, caller:*, listener:Function, arg...

来源: Laya2.0_api 发布时间: 20190513

217. timer无法执行 [ 52%]

...可以正常执行,但是 constructor() { super(); //添加3D场景 this.onAwake(); //加载camera和light this.onStart(); //加载地面 this.loadGround(); //加载墙面 this.loadwall(); this.loopShoot(); } public loopShoot(): void{ Laya.timer.loop(1000, this, this.shootBall); }   public shootB...

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

218. laya.d3.core.MeshTerrainSprite3D_API3.0 [ 52%]

...lag hasListener isAncestorOf off offAll offAllCaller on onAfterDeserialize onAwake onDestroy onDisable onEnable once removeChild removeChildAt removeChildByName removeChildren removeInputChild removeSelf replaceChild runCallLater setChildIndex timerLoop timerOnce createFromMesh createFromMeshAndHeig...

来源: Laya3.0_api 发布时间: 20231102

219. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 加载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE)....

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

220. Laya3D场景加载问题 [ 52%]

...ate/Conventional/Test.ls",     ];     constructor() { super(); }     onAwake(): void {         Laya.loader.create(this.resource, Laya.Handler.create(this, this.onPreLoadFinish));     }     onPreLoadFinish() {         //初始化3D场景         let test = Laya.Loader.getRes("ga...

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