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

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

271. [LayaAirIDE3]2d相机打包后问题 [ 57%]

...r";  const { regClass, property } = Laya;  @regClass() export class Main extends Laya.Script {     @property({ type: Laya.Sprite })     public player: Laya.Sprite;      @property({ type: Laya.Sprite })     public joystick: Laya.Sprite;      @property({ type: Laya.Sprite })     public...

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

272. 2.x引擎项目升级说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

....on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯2D,或2D/3D混合这两种情况中均可正常使用。 3.2 2...

来源: Laya3.0_文档 发布时间: 20251010

273. [LayaAirIDE3]发布后的bundle.js,类的定义顺序错误 [ 57%]

...互引用,改为: public instance:any   }   export default class B extends A{   } 2024-12-16 1 0 分享 微博 QZONE 微信 正阳子 赞同来自: laya这种类顺序问题是类相互循环引用导致,比如A,B相互继承,然后又相互引用,100%导致引擎出现这种问题...

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

274. Laya List给子元素添加事件后,滚动事件被劫持了 [ 57%]

...toreTxList);     悬赏找大神看问题 export default class StoreItem extends Laya.Box { constructor() { super(); this.size(195, 210); }  } 附件 : --> ListDemo.zip 2019-07-11 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

275. 关于新手引导 [ 57%]

...; import laya.utils.Browser; import laya.utils.HitArea; public class KouTu extends Sprite { private var box:Sprite; private var interactionArea:Sprite; private var maskArea:Sprite; private var guideContainer:Sprite; private var gameContainer:Sprite; public function KouTu() { super(); //绘制一个...

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

276. 用Socket连接服务器,服务端显示已经有登录,但Event.OPEN没有触发 [ 56%]

...import laya.utils.Byte;               public class CConnector extends Socket     {         protected var sendBuf:Byte = null;         protected var recvBuf:Byte = null;                  public function CConnector()         {          ...

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

277. [LayaAir3]如何在3D场景添加文字呢 [ 56%]

...用 ui3d.sprite 获取 prefab 的根节点.   export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { let sprite3d: Laya.Sprite3D = this.scene3D.getChildByName("m_Sprite3D"); let ui3d: Laya.UI3D = sprite3d.getComponent(Laya.UI3D); let ui3d_root: Laya.Sprite = ui3d.sprite; console.l...

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

278. webgl 下当对象子显示对象存在panel且panel有子集时,旋转此显示对象会导致此显示对象的同级对象消失!(1.7.10beta) [ 56%]

...d消失 parent.child_1.rotation = Math.random() * 180; } } class ChildView extends ui.ChildViewUI{ constructor(){ super(); var panel = new Laya.Panel(); panel.pos(0,0); panel.size(200,50); this.addChild(panel); var panelChild = new Laya.Sprite(); panelChild.pos(0,0); panelChild.size(200,50); panel.a...

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

279. Morn下List组件如何给每一条列表添加Click事件,是需要for吗? [ 56%]

...e.components.Box; import morn.core.handlers.Handler; public class ListView extends ListViewUI { public function ListView() { super(); var arr:Array=[]; for(var i:int=0;i<95;i++) { arr.push({icon:i,label:"Index"+i}); } boxList.array=arr; boxList.mouseHandler=new Handler(listRender); } private func...

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

280. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 56%]

...rotation旋转之后检测不了碰撞   附上代码  class FishPonds extends Laya.Sprite { public are: Laya.Rectangle = new Laya.Rectangle(0, 0, 60, 30); constructor() { super(); var _fish: Laya.Sprite = new Laya.Sprite() _fish.graphics.drawRect(this.are.x, this.are.y, this.are.width, this.are.h...

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