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

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

901. 官方新手游戏引导示例中关于hit和unHit的使用疑问 [ 68%]

...用反了。hitArea = new HitArea(); hitArea.hit.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.hitArea = hitArea; guideContainer.mouseEnabled = true; hitArea.unHit.clear(); hitArea.unHit.drawCircle(step.x, step.y, step.radius, "#000000");我的理解是给父容器gu...

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

902. laya2.0 截图功能分享,直接截取屏幕上所有对象 [ 68%]

...tatic tempTexture: Laya.Texture; /**截图 */ public static drawScreenshot(width, height, x, y) { if (!SwitchHelper.screenDraw) { return null; }  if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(system.width, system.height); } if (!this.tempTexture) { this.tempTexture = new Laya.T...

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

903. Sprite.loadImage在Android平台无法卡死,web和iOS平台正常 [ 68%]

...放置头像, var sp = new Laya.Sprite(); sp.loadImage(url, 0, 0, widget.width, widget.height); //从网络加载图片生成Sprite widget.removeChildren(); // 防止重复提交,把之前生成的头像先删除 widget.addChild(sp); // 添加为只节点 }; 2017-12-29 添加评论 免费帖 -->...

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

904. stage.height获取高度有bug吗 [ 67%]

...感谢@mengjia @zq4950411 解答 根据@mengjia 的建议使用SCALE_FIXED_WIDTH来适配,并配合相对布局,轻松解决了我的需求(代码见上图) 2018-03-12 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Blueria 相关...

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

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

...t.itemRender = StoreItem;   storeTxList.name = 'storeTxList'; storeTxList.width = 610; storeTxList.pos(0, 0); storeTxList.repeatX = repeatX; storeTxList.repeatY = repeatY; //y轴个数 // 使用但隐藏滚动条 storeTxList.vScrollBarSkin = "store/c.png"; let scrollBar = storeTxList.getChildByName...

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

906. 在 tiledmap 插入一个精灵在上面 [ 67%]

...this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height),   Laya.Handler.create(this,this.loadedMap)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);...

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

907. 微信小游戏开放数据域按钮点击位置偏移 [ 67%]

...etOpenDataContext() var sharedCanvas = openDataContext.canvas sharedCanvas.width = layout.width; sharedCanvas.height = layout.height; //先清空绘制 layout.graphics.clear(false); //设置大小 var canvas = new Laya.Texture(sharedCanvas); canvas.bitmap.alwaysChange = true;//小游戏使用,非...

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

908. laya.ui.View_API3.0 [ 67%]

...Through name tag drawtocanvCtx unDestroyedScenes Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode bottom cacheAs centerX centerY components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation glob...

来源: Laya3.0_api 发布时间: 20231115

909. 微信小游戏渲染开放域卡顿处理 [ 67%]

...am?: any): void {             var self = this;             var width = self.width;             var height = self.height;             var data = {                 view: self.$viewName,                 width: width,                 height: height     ...

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

910. Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件? [ 67%]

...I extends Laya.Scene { public static uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart","label":"label"},"compId":3}],"loadList":["comp/button.png"],"loadList3D":[]}; constructor(){ ...

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