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

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

841. 关于对象池Laya.Pool的用法 [ 65%]

...sp = Pool.getItemByClass(SPRITE_SIGN, Sprite) sprites.push(sp); Laya.stage.addChild(sp); } } initialize(); Laya.stage.on("click", this, function() {     var sp;     for(var i = 0, len = sprites.length; i < len; i++)     {         sp = sprites.pop();       ...

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

842. 用layaair如何加載蒙皮動畫,请问怎么加载.lm文件和.ani文件,有沒有實例可以看下 [ 65%]

...件,有沒有實例可以看下 代碼如下: this.scene = Laya.stage.addChild(new Laya.Scene()); //加载相机 this.camera = this.scene.addChild(new Laya.Camera()); this.scene.CurrentCamera = this.camera; //男角色 this.roleMan = new Laya.MeshSprite3D(Laya.Mesh.load("3d/man/CunMinNan-cunminn...

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

843. 阻止点击穿透问题 [ 65%]

...alpha = 0.8; bg.graphics.drawRect(0,0,W,H,"#000000"); this.prizeAlertLayer.addChild(bg); this.prizeAlertLayer.addChild(Main.items["prizeinfo"]); Laya.stage.addChild(this.prizeAlertLayer);   this.prizeAlertLayer.visible = false; 附件 : --> 2018-06-01 1 条评论 免费帖 --> 分享 微博 QZONE ...

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

844. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 65%]

...Info.width; this._body.height = this._objectInfo.templateInfo.height; this.addChild(this._body); this.on(Event.MOUSE_OVER, this, this.__onMouseOverHole); this.on(Event.MOUSE_OUT, this, this.__onMouseOutHole); } this.pos(this._objectInfo.templateInfo.x, this._objectInfo.templateInfo.y); } private __o...

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

845. 使用3D精灵 · LayaAir3.0文档 · LAYABOX [ 65%]

...nsform.position = new Laya.Vector3(1,0,0); //添加到场景中 this.scene.addChild(sp); 其次,这里详细讲解下Sprite3D中特有的克隆接口instantiate /** * 创建精灵的克隆实例。 * @param original 原始精灵。 * @param parent 父节点。 * @param worldPositionStays 是否保...

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

846. 使用mask后,只要调用 Laya.Resource.destroyUnusedResources() 就会引起报错 [ 65%]

....drawRect(0, 0, 200, 200, "#0xFFFF00"); bgSprite.pos(300, 300); Laya.stage.addChild(bgSprite); let mask = new Laya.Sprite(); bgSprite.mask = mask; mask.graphics.drawCircle(0, 0, 100, "0x0000FF"); window.onblur = function() { console.log("onblur....?"); Laya.timer.once(2000, null, function() { Laya.R...

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

847. 示例 骨骼动画换装 加不上点击事件 [ 65%]

... = mStartX; mArmature.y = mStartY; //mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); //mArmature.on(Event.LABEL, this, onEvent); mArmature.on(Event.STOPPED, this, completeHandler); mArmature.on(Event.CLICK, this, onChangeSkin); mArmature.showSkinByName(mSkinList[0]); play(); //changeSkin(...

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

848. 为何发布到微信小程序上,iphone xr会出现精灵显示不全的问题? [ 65%]

...a.stage.width / 480; bgSprite.scaleY = Laya.stage.height / 852; Laya.stage.addChild(bgSprite);   在安卓和其他的ios设备上都正常,但是在iphone xr上就遇到了显示不全的问题。 有问题的设备的相关信息如下: ios版本:12.2 微信版本:version 7.0.4   刚开...

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

849. 飞机大战出现的问题注册了类New的时候报错未定义 [ 65%]

...g = new BackGround(); //把背景添加到舞台上显示出来 Laya.stage.addChild(this.bg);  })();     })();   //循环滚动的游戏背景 var BackGround = (function(_super){ function BackGround(){ BackGround.super(this); //创建游戏背景1 this.bg1 = new Laya.Sprite(); //加载并显示...

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

850. 加载UI不成功,项目源码已经上传 [ 65%]

... function onLoaded(): void { var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); } 这是加载ui的代码

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