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

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

11. laya.components.Script [ 83%]

...虚方法,使用时重写覆盖即可 Script  onTriggerEnter(other:*, self:*, contact:*):void 开始碰撞时执行 此方法为虚方法,使用时重写覆盖即可 Script  onTriggerExit(other:*, self:*, contact:*):void 结束碰撞时执行 此方法为虚方法,使用时重写覆盖即...

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

12. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...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

13. 发射射线检测不到,物体有包围盒 [ 81%]

...,物体确定加包围盒了      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

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

...来自: 是要模仿镜头移动功能吗,这样可以 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

15. Tween循环动画 [ 81%]

...函数实现 -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

16. dialog 里的数据已经获取到了,也赋值了但是页面没跟新,addChild好像无效果 [ 81%]

...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

17. 在add panel 后设置 hScrollBar.value 没有用 [ 80%]

...        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

18. down点击事件一直派发情况 [ 80%]

...: 与内容相关的链接 提交 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

19. iOS 重新初始化引擎 [ 80%]

...载url_x),  controllerB初始化报错 [[conchRuntime alloc] initWithView:self.m_pGLKView EAGLContext:self.m_pEAGLContext downloadThreadNum:3 URL:self.url]; 初始化报错   附件 : --> 2018-08-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

20. 多线程Worker · LayaAir3.3 · 引擎文档 · LAYABOX [ 80%]

...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