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

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

201. hitTestPoint对象父容器rotation旋转之后检测不了碰撞 [ 57%]

...tor() { super(); var _fish: Laya.Sprite = new Laya.Sprite() _fish.graphics.drawRect(this.are.x, this.are.y, this.are.width, this.are.height, "#00ff00"); _fish.x = 300 _fish.y = 200 this.addChild(_fish); Laya.timer.loop(100, this, function () { console.log(_fish.x, _fish.y, _fish.width, _fish.height,...

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

202. 有时候飘字的时候会在其他地方有一道黑条是什么原因? [ 56%]

...rue; this.addChild(_divElement); var ms:Sprite = new Sprite(); ms.graphics.drawRect(0,0,567,32,"#ffffff"); this.mask = ms;   2017-12-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 ainideqingliang 赞同来自:...

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

203. 向TiledMap中的对象层中的矩形框添加精灵,不显示 [ 56%]

...apLayer:MapLayer=tiledMap.getLayerByIndex(2); sp=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); sp.zOrder=1000; mapLayer.addChild(sp); Laya.timer.loop(200,this,onLoop); } private var aaa:Number=0; private var bbb:Number=0; private function onLoop():void { aaa--; sp.x++; tiledMa...

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

204. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 55%]

....init(500,500); Laya.stage.bgColor="#EEFFCC"; sp=new Sprite(); sp.graphics.drawRect(0,0,100,50,"#FF0000"); sp.size(100,50); // 设置轴心点为显示对象的中心,显示位置在可拖拽区域之内 sp.pivot(sp.width/2,sp.height/2); sp.pos(250,450); Laya.stage.addChild(sp); //为需要滑动...

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

205. 限制区域拖动效果,为什么会无法限制呢? [ 55%]

...dthLimit, dragHeightLimit); //画出拖动限制区域 Laya.stage.graphics.drawRect( dragRegion.x, dragRegion.y, dragRegion.width, dragRegion.height, null, "#FFFFFF", 2); } console.log(dragRegion)  function onStartDrag(e) { this.startDrag(dragRegion, true, 100); } }  Laya.class(GolfMainUI, "GolfMa...

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

206. 在 tiledmap 插入一个精灵在上面 [ 55%]

...Map)); }   loadedMap(){   this.sp=new Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);   console.info(mapLayer.layerName);   this.sp.pos(0,0);   mapLayer._childs[0].addChild(this.sp); }   }   new GameInfo();   遇到的...

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

207. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 55%]

...    var _mDown:Sprite=new Sprite();             _mTop.graphics.drawRect(0,0,1,1,"#0");     3.叠加效果 BlendMode.ADD,apk中无效   4.MouseManager.as 运行 时报错,“ touchemoves is undefined”                case "touchmove":                      va...

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

208. 分享:Dragonbones/Spine的换肤操作 [ 54%]

... var btn:Sprite=new Sprite();//绘制一个红色矩形按钮 btn.graphics.drawRect(0,0,150,30,'#FF0000'); btn.pos(10,430); btn.size(150,30);//sprite如果要触发鼠标事件,务必设置好size,也就是鼠标的相应区域 btn.on(Event.CLICK,this,onChangeSkin); Laya.stage.addChild(btn); var...

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

209. 自定义组件时,设置组件子节点的image的skin时,路径为layaIde的路径而非项目路径 [ 54%]

...ize():void{ super.initialize(); _proMask = new Sprite(); _proMask.graphics.drawRect(0, 0, _progress.width, _progress.height); _proMask.scaleX = 0; _progress.mask = _proMask; _bar.stateNum = 1; } override protected function createChildren():void { super.createChildren(); var index:Number = getChildIn...

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

210. 游戏引导 原来使用 blendMode = "destination-out"; 现在怎么用? [ 54%]

...致 mask 的尺寸超过2048导致引发上面的问题 this.mask.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000");

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