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

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

21. 计时器-延迟执行 [ 91%]

... this.button2.on(Event.CLICK, this, this.onDecreaseAlpha2); } createButton(label) { const Sprite = Laya.Sprite; let w = 300, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, ...

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

22. 计时器-延迟执行 [ 91%]

...; button2.on(Event.CLICK, this, onDecreaseAlpha2); } function createButton(label) { var w = 300, h = 60; var button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } fun...

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

23. 射线检测-放置物体 [ 90%]

... Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (function loadUI() { var label = new Laya.Label(); label.text = "点击放置"; label.pos(Laya.Browser.clientWidth / 2.5, 100); label.fontSize = 50; label.color = "#40FF40"; Laya.stage.addChild(label); var _position = new Laya.Vector3(0, 0, 0); var _...

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

24. matter中有没有类似于unity中的OnCollision碰撞检测函数呀,用js怎么写 [ 90%]

... event.pairs.length; i++) {  var pair = event.pairs[i];  if(!(pair.bodyA.label === 'gun' || pair.bodyB.label == "gun")) continue;  var other;  if (pair.bodyA.label === 'gun') { other = pair.bodyB; } else { other = pair.bodyA; }  switch(other.label) { case "gameover": { home.onGameOver(); } brea...

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

25. radioGroup设置labels后,每个radio的icon皮肤无法显示了 [ 89%]

radioGroup设置labels后,每个radio的icon皮肤无法显示了 如图,我通过代码设置radioGroup的labels属性后,icon就没有显示了,代码如下: 在入口文件: Laya.loader.load("res/atlas/template/QuestionDialog.atlas", Handler.create(null)); 对应的场景代码里:...

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

26. 射线检测-点击行走 [ 88%]

... Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (function loadUI() { var label = new Laya.Label(); label.text = "点击放置"; label.pos(Laya.Browser.clientWidth / 2.5, 100); label.fontSize = 50; label.color = "#40FF40"; Laya.stage.addChild(label); var _offset = new Laya.Vector3(0, 0.25, 0); var ...

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

27. matter 2d 碰撞检测 [ 88%]

...t; event.pairs.length; i++) {  var pair = event.pairs[i];  if(pair.bodyA.label === 'gun' && pair.bodyB.label == "gameover") { this.onGameOver(); }  } }   private onGameOver(): void { console.log("结束游戏...");} 附件 : --> 2018-05-24 添加评论 免费帖 --> 分享 微博 QZONE ...

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

28. 骨骼Label事件,多接收一次 [ 88%]

骨骼Label事件,多接收一次 看了骨骼里的事件数据eventAniArr只有一次,但我函数却收到了2次回调 附件 : --> 2018-03-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来...

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

29. laya.utils.TimeLine_API3.0 [ 88%]

...EventDispatcher TimeLine Index Properties scale Accessors total Methods addLabel destroy event from gotoLabel gotoTime hasListener off offAll offAllCaller on once pause play removeLabel reset resume to from to Properties scale scale: number = 1 Defined in laya/utils/TimeLine.ts:45 缩放动画播放...

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

30. laya.ui.TextInput [ 87%]

...s | Events Packagelaya.uiClasspublic class TextInputInheritanceTextInput Label UIComponent Sprite Node EventDispatcher ObjectSubclasses TextArea TextInput 类用于创建显示对象以显示和输入文本。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties Pro...

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