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

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

651. 鼠标点击穿透问题 [ 72%]

...0xFF00FF); sp1.graphics.drawRect(100,100,200,200); sp1.graphics.endFill(); addChild(sp1); sp1.addEventListener(MouseEvent.CLICK,onSp1); var sp2:Sprite=new Sprite(); sp2.graphics.beginFill(0xFFFF00); sp2.graphics.drawCircle(200,200,100); sp2.graphics.endFill(); addChild(sp2); sp2.mouseEnabled=false; ...

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

652. 刮刮卡效果实现 [ 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

653. dialog的popup方法不会关闭其他弹窗 [ 72%]

...new NormalDialog(context); this.normalDialog.popup(true, true); Laya.stage.addChild(this.normalDialog);  }  }     // 弹窗代码   class NormalDialog extends ui.normalDialogUI { constructor( text: string ) { super(); // 设置label文字 this.context.text = text; this.btn_close.on(Laya.Event.C...

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

654. 小游戏导入手机后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

655. 导入3D模型有问题 [ 72%]

...。   主要代码: //添加照相机         var camera = (scene.addChild(new Laya.Camera(0, 0.1, 1000)));         camera.transform.translate(new Laya.Vector3(0, 3, 3));         camera.transform.rotate(new Laya.Vector3(0, 0, 0), true, false);         camera.clearColor = null;   ...

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

656. 报错,这不是个构造函数 "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

657. Laya.Pool.getItemByClass 找不到上次释放的对象 [ 72%]

...ar bg1:BackGround= Laya.Pool.getItemByClass("mybg",BackGround); Laya.stage.addChild(bg1); console.log("bg1->",bg1); //对象放回Pool里,并清除对象 Laya.Pool.recover("mybg",BackGround); bg1.removeSelf(); Laya.stage.removeChild(bg1); console.log("bg1->",bg1); //再次从Pool里获取对...

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

658. 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

659. 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

660. camera.addComponent(CameraMoveScript)报错 [ 72%]

...剪) var camera = new Laya.Camera(0, 0.1, 100); // 加载到场景 scene.addChild(camera); // 移动摄像机位置 camera.transform.position = new Laya.Vector3(0, 5, 23); // 旋转摄像机角度 camera.transform.rotate(new Laya.Vector3(-17, 0, 0), false); // 设置摄像机视野范围(角度)...

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