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

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

1081. MovieClip 报错 7 [ 71%]

MovieClip 报错 7 来, 你的代码, 修改 Laya.timer.frameLoop(1, this, this.timeHandelr); 一帧创建一个动画, 这个需求不过分吧?   附件 : --> 2018-09-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 ...

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

1082. 请教Laya.BitmapFont加载位图文字不能显示的问题 [ 71%]

...; private mBitmapFont:Laya.BitmapFont; constructor() { Laya.init(600,400); this.mBitmapFont = new Laya.BitmapFont(); this.mBitmapFont.loadFont("../laya/assets/txt.fnt", new Laya.Handler(this.onLoaded)); } private onLoaded():void { this.init(); } private init():void { this.mBitmapFont.setSpaceWidth(1...

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

1083. ani动画的问题 [ 71%]

ani动画的问题 我做了个ani的动画 this.ani2.loadAnimation("Ani/test.ani"); this.ani2.play(0,false, "test" ); 这样是能够播放的 但是我把动画直接拖到一个UI上,var 为ani1 直接调用 this.ani1.play(0,false, "test");会报 ani not found: Ani/test.ani#test Ani/test.ani ...

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

1084. Sprite-缓存为静态图像 [ 71%]

....stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } private setup(): void { var textBox: Sprite = new Sprite(); // 随机摆放文本 var text: Text; for (var i: number = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 10...

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

1085. 为什么hitTestPoint始终是false? [ 71%]

...nstructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知...

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

1086. 区块地图-PerspectiveWall [ 71%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/per...

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

1087. 运动刚体(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 71%]

...上添加的loop事件 onKeyDown(){ Laya.KeyBoardManager.hasKeyDown(87) && this.kinematicSphere.transform.translate(new Laya.Vector3(0, 0, -0.2));//W Laya.KeyBoardManager.hasKeyDown(83) && this.kinematicSphere.transform.translate(new Laya.Vector3(0, 0, 0.2));//S Laya.KeyBoardManager.hasKeyDown(65) &...

来源: Laya2.0_文档 发布时间: 20210715

1088. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 71%]

...戏, 如何在tiledMap格子中添加精灵? // TiledMap 5X5格子地图 this.tMap = new Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect);  // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(...

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

1089. dialog第一次可以正常调出,第二次无法正常popup出来 [ 71%]

...init函数     LoginView.prototype.init = function () {         this.btnReg.on(Laya.Event.CLICK, this, this.onBtnReg);         this.btnLogin.on(Laya.Event.CLICK, this, this.onBtnLogin);         this.dlg = new NormalDialog();         this.dlg.init();     };   附件...

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

1090. 新手,图片加载不进去,没有报错。很疑问 [ 71%]

...ckGround=(function(_super){ function BackGround(){ BackGround.__super.call(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("comp/bg.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite)代码我这样写可以正常显示,你试试...

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