大约有 13 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0030 秒)
...a_Aaron 赞同来自: 给dialog 的场景添加一个脚本,在脚本的 onStart 里面调用popup, 刚new 就调用并没有获取到宽高,时机问题导致 2018-12-12 0 1 分享 微博 QZONE 微信 风不会停 赞同来自: 有没有标准的写法? 我添加dialog添加了控制脚本,...
来源: Laya_社区 发布时间: 20181211
...提示 比如鼠标事件触发回调函数中有报错,Script脚本类onStart函数有报错等... 在这些函数执行中如果触发错误都只会在控制台打印错误,而不会弹出提示,因为底层代码中这些逻辑被try了catch中只打印了打印错误日志,这样会造...
来源: Laya_社区 发布时间: 20240710
...structor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KEY_DOWN, this, this.birdFly); this.init(); } public init(): void { Laya.Tween.to(this.kaishi_btn, { y:...
来源: Laya_社区 发布时间: 20180507
...a.Vector3(1, 1, 1); @property(Laya.Camera) camera: Laya.Camera; onStart() { //@ts-ignore window.camera = this.camera; console.log("Game start", this.camera._up); console.log( "Game start", this.camera._up.x, this.camera._up.y, th...
来源: Laya_社区 发布时间: 20241029
...wner.getChildByName("Main Camera") as Laya.Sprite3D).transform.position) } onStart(): void { Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDownCb) } private onMouseDownCb(e:Laya.Event):void{ console.log("点击屏幕") // console.log("相机位置",this.camera.) this.camera.viewportPoin...
来源: Laya_社区 发布时间: 20190621
...e index: number = -1; public pageWidth: number; public pageHeight: number; onStart() { console.log("Game start"); Laya.loader.load("resources/res/spineboy-pma.skel", Loader.SPINE).then((templet: SpineTemplet) => { this.skeleton = new SpineSkeleton(); this.skeleton.templet = templet; this.owner.ad...
来源: Laya_社区 发布时间: 20230703
...射射线,但是检测不到物体,物体确定加包围盒了 onStart(): void { var self = this; this.hitResult=new Laya.HitResult(); Laya.Scene3D.load("res/LayaScene_game/Conventional/game.ls",Laya.Handler.create(null,function(sce...
来源: Laya_社区 发布时间: 20220506
...ss, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); console.log(i...
来源: Laya_社区 发布时间: 20250819
... this.first = true; this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D; this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text; this._camera = this._scene.getChildByName("camera") as Laya.Cam...
来源: Laya_社区 发布时间: 20190531
...cript: Joystick; private cameraController: CameraController; onStart() { // 初始化组件引用 this.playerScript = this.player.getComponent(Player); this.joystickScript = this.joystick.getComponent(Joystick); this.cameraController = th...
来源: Laya_社区 发布时间: 20251125