大约有 78 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0032 秒)
...虚方法,使用时重写覆盖即可 Script onTriggerEnter(other:*, self:*, contact:*):void 开始碰撞时执行 此方法为虚方法,使用时重写覆盖即可 Script onTriggerExit(other:*, self:*, contact:*):void 结束碰撞时执行 此方法为虚方法,使用时重写覆盖即...
来源: Laya2.0_api 发布时间: 20190513
...igidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果子弹超出屏幕,则移除子弹 if ((this.owner as Laya.Sprite).y < -10) { this.owner.removeSe...
来源: Laya3.0_文档 发布时间: 20251010
...,物体确定加包围盒了 onStart(): void { var self = this; this.hitResult=new Laya.HitResult(); Laya.Scene3D.load("res/LayaScene_game/Conventional/game.ls",Laya.Handler.create(null,function(scene3d){ // HelperAp...
来源: Laya_社区 发布时间: 20220506
...来自: 是要模仿镜头移动功能吗,这样可以 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() { this.cameraRect...
来源: Laya_社区 发布时间: 20190214
...函数实现 -10度 到 10 度之间来回摆动 tweenCircle = function (self) { var rotation = 0; if (self.rotation > 0) { rotation = -10; } else { rotation = 10; } Tween.to(self, { rotation: rotation, complete: Handler.create(this, this.tweenCircle, [self]), }, 2000, Ease.quadInOut); }
来源: Laya_社区 发布时间: 20161011
...ole.log('+++++++++++++++++++') console.log(_super); console.log(fooddata); self.foodList.dataSource = fooddata; //实例化角色容器 var foodBox = new Laya.Sprite(); //添加到舞台上 console.log(self.foodBox); Laya.stage.addChild(foodBox); self.foodBox = fooddata; console.log(self.foodBox);...
来源: Laya_社区 发布时间: 20181221
... Laya.Tween.to(this,{alpha:1},200); self.panel_room.hScrollBar.value = 432; console.log("self.panel_room.hScrollBar.value " + self.panel_room.hScrollBar.value); 这里打印出来一直是 默认值 1 2019-01-08 0 1 分享 微博 QZONE 微信 为什么被折...
来源: Laya_社区 发布时间: 20190108
...: 与内容相关的链接 提交 3 个回复 cuixueying 赞同来自: self.sendBtn.on(Laya.Event.CLICK, self, self.onHandle); 这里用CLICK事件替代,或者同时监听一个MOUSE_UP事件,当鼠标抬起时,将MOUSE_DOWNshi事件移除 2017-03-07 0 1 分享 微博 QZONE 微信 yanmingji...
来源: Laya_社区 发布时间: 20170307
...载url_x), controllerB初始化报错 [[conchRuntime alloc] initWithView:self.m_pGLKView EAGLContext:self.m_pEAGLContext downloadThreadNum:3 URL:self.url]; 初始化报错 附件 : --> 2018-08-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...
来源: Laya_社区 发布时间: 20180809
...ker. 新建一个my_task.js文件,放到js文件夹下,代码如下: self.addEventListener('message', function (e) { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get",...
来源: Laya3.0_文档 发布时间: 20251010