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

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

371. 自己画的view不支持鼠标点击吗? [ 72%]

... View(); btn_1.graphics.drawPath(0, 0, path, {fillStyle: "#123456"}); this.addChild(btn_1); btn_1.mouseEnabled=true; btn_1.on(Event.MOUSE_DOWN, this, onClickBt1);     不管怎么点,在这个点击方法里面是不会执行的  2018-07-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

372. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 72%]

...structor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.BoxCollider); box.height = 60; box.width = 28; //添加刚体 th...

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

373. 报错,这不是个构造函数 "StartPage is not a constructor" [ 72%]

...AS); })() function onLoaded(){ var StartPage = new StartPage(); Laya.stage.addChild(StartPage); var GamePage = new GamePage(); Laya.stage.addChild(GamePage); } })(); 2018-10-29 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1...

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

374. 粒子特效,播放与克隆有bug [ 72%]

...19-11-26 0 1 分享 微博 QZONE 微信 子艮 赞同来自: let sp3d = lf.addChild(Laya.loader.getRes("res/zhadan/1/LayaScene_zhadan/Conventional/zhadan.ls")) as Scene3D; let spCore = sp3d.getChildByName("Canvas") as Sprite3D; spCore.transform.localPosition = new Vector3(0, 0.7, 90); let tp3d = Spr...

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

375. 刮刮卡效果实现 [ 72%]

...unction(){ this.guaSpr.cacheAs = "bitmap"; ape = new Sprite(); this.guaSpr.addChild(ape); ape.loadImage("WBSign/img_guakaituceng.png"); ape.on(Event.MOUSE_MOVE, this, onMouseMove); interactionArea = new Sprite(); interactionArea.blendMode = "destination-out"; ape.addChild(interactionArea); interacti...

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

376. layabox 只支持一个灯光? [ 72%]

...光 private addLoadCCDLight() { //聚光灯 this.loadCCDlight = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight; this.loadCCDlight.color = new Laya.Vector3(1, 1, 1); this.loadCCDlight.transform.position = new Laya.Vector3(-1, 1.2, 0.0); this.loadCCDlight.direction = new Laya.Vector3(0.15...

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

377. 3D场景销毁后,仍有引用存在,内存中场景及引用其的对象无法销毁 [ 72%]

...引用其的对象无法销毁         this.scene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D;          this.camera = new Laya.Camera();         this.camera.transform.translate(new Laya.Vector3(0, 2, 5));         this.camera.transform.rotate(...

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

378. 小游戏导入手机后Sprite.Mask没有正常显示 [ 72%]

...s(url) var sp = new Sprite() sp.graphics.drawTexture(t, 0, 0, 80, 80) that.addChild(sp)  var cMask = new Sprite() cMask.graphics.drawCircle(40, 40, 37, "#ff0000") sp.mask = cMask //sp.addChild(cMask) //sp.removeChild(cMask) sp.pos(7,14) console.log(cMask.x, cMask.y) }, null, "image"))   一个圆...

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

379. laya2.0如何设置父子关系和解除父子关系? [ 72%]

...内容相关的链接 提交 2 个回复 Laya_Aaron 赞同来自: 父节点addchild 子节点 这样子,removeself 就解除了 2019-03-12 0 3 分享 微博 QZONE 微信 内涵tv何吓吓 赞同来自: 没记得官方有这个方法,你只能用变量getChild存子节点,然后再addchild到...

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

380. 圆不跟谁 sprite 一起缩放? [ 72%]

...this._rootSp.hitArea = new Laya.Rectangle(0, 0, 10000, 10000) this._rootSp.addChild(this.firstSp); Laya.stage.addChild(this._rootSp); }  private MouseWheel(e: Laya.Event) { let xs = this.firstSp.scaleX; if (e.delta > 0) { xs = xs * 1.2; } else { xs /= 1.2; } this.firstSp.scale(xs, xs); } } new G...

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