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

大约有 118 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0028 秒)

31. 输入设备-贪吃蛇(重力感应) [ 69%]

... Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Event = Laya.Event, Accelerator = Laya.Accelerator; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; La...

来源: Laya2.0_示例 发布时间: 20240930

32. 输入设备-贪吃蛇(重力感应) [ 69%]

...化蛇 initSnake(); // 监视加速器状态 Accelerator.instance.on(Laya.Event.CHANGE, this, monitorAccelerator); // 游戏循环 Laya.timer.frameLoop(1, this, animate); // 食物生产 Laya.timer.loop(3000, this, produceFood); // 游戏开始时有一个食物 produceFood(); })() function initSnak...

来源: Laya_示例 发布时间: 20240930

33. 给Laya.Browser.window添加监听事件导致页面加载不出来是怎么回事??? [ 67%]

...是怎么回事??? 类似这样的方式 Laya.Browser.window.on(Laya.Event.VISIBILITY_CHANGE, this, this.triggerExit); 整个页面一片黑…… 2018-02-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 La...

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

34. laya.d3.core.MeshFilter [ 66%]

... Classes | Index | Frames No Frames MeshFilterProperties | Methods | Events Packagelaya.d3.coreClasspublic class MeshFilterInheritanceMeshFilter GeometryFilter EventDispatcher Object MeshFilter 类用于创建网格过滤器。 Public Properties Hide Inherited Public Properties Show Inherited...

来源: laya_api 发布时间: 20170929

35. matter中更换texture [ 66%]

...,图片没变,好像没有更新. //事件回调---collisionStart Matter.Events.on(engine, 'collisionStart', function(event) { var pairs = event.pairs; // change object colours to show those ending a collision for (var i = 0; i < pairs.length; i++) { var pair = pairs[i]; pair.bodyA.render.fillS...

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

36. 多个模块之间相互嵌套import,导致运行报错 [ 65%]

...ager身兼多职引起的,在Animals中不要引用Manager。应该引入event机制,当Anaimal的attack动作发生时,触发'attack' 事件,而在Manager里监听attack事件,调用自已的change函数。 Animal.tsclass Animal implements EventEmiter { public sex: number = 0; public Creat...

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

37. laya.d3.component.Component3D [ 64%]

...Classes | Index | Frames No Frames Component3DProperties | Methods | Events Packagelaya.d3.componentClasspublic class Component3DInheritanceComponent3D EventDispatcher ObjectImplements IUpdate, laya.resource.IDestroySubclasses Animator, AttachPoint, Collider, KeyframeAnimations, Script Compon...

来源: laya_api 发布时间: 20170929

38. 切换后台时,引擎如何判断是否停止定时器? [ 64%]

...structor() {         super();          this.stage.on(Laya.Event.FOCUS, this, this.onFocus);         this.stage.on(Laya.Event.BLUR, this, this.onBlur);         Laya.timer.frameLoop(1,this,this.onFrameLoop);     }      private onFrameLoop():void{       ...

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

39. laya.d3.component.animation.KeyframeAnimations [ 64%]

... | Index | Frames No Frames KeyframeAnimationsProperties | Methods | Events Packagelaya.d3.component.animationClasspublic class KeyframeAnimationsInheritanceKeyframeAnimations Component3D EventDispatcher ObjectSubclasses RigidAnimations, SkinAnimations KeyframeAnimation 类用于帧动画组...

来源: laya_api 发布时间: 20170929

40. input输入框修改切换type类型后,内容无法正确显示; [ 63%]

... 提交 1 个回复 Laya_XS 赞同来自: 不建议你这样修改,this.event(Laya.Event.CHANGE);这个是多余的,你的代码生效无非是text重新赋值内容触发了再一次排版。你可以直接在设置了文本type后,直接修改下文本的内容就可以了。 2021-07-29 0 0 ...

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