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

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

171. Templet资源删除不掉 [ 71%]

...    Laya.stage.addChild(swordman);              swordman.pos(width / 2,  height / 2);             Laya.timer.frameOnce(100, this, unload);         }         private function unload() : void         {             swordman.destroy();           ...

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

172. 滤镜问题,有复现demo [ 71%]

...消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); btn.size(200, 100); btn.graphics.drawRect(0, 0, btn.width, btn.height, "#ff00ff"); Laya.stage.addChild(btn); btn.on(Event.MOUSE_DOWN, this, function...

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

173. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 71%]

...ew Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect); // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000;     请问这里如何把...

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

174. HtmlDivElement限制文本宽度无效? [ 70%]

...DivElement(); this.labaContent.style.fontSize = 22; this.labaContent.style.width=100; this.labaContent.style.wordWrap=false; this.labaContent.x = 60; this.labaContent.y = 5; 为什么还是不行呢?请问 我的文本是通过innerHTML <span>输出的 2017-09-15 添加评论 免费帖 --> ...

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

175. 缓动-简单的Tween [ 70%]

... Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() {...

来源: Laya2.0_示例 发布时间: 20261113

176. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 70%]

...ew Laya.TiledMap(); var viewRect = new Laya.Rectangle(-50,-50,Laya.Browser.width,Laya.Browser.height); this.tMap.createMap("res/map/map.json",viewRect);  // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000;   请问这里如何把精...

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

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

...per(this)  var dragRegion; showDragRegion(); this.golfBall.x = Laya.stage.width / 2; this.golfBall.y = Laya.stage.height / 2; this.golfBall.on(Event.MOUSE_DOWN, this, onStartDrag)  function showDragRegion() { //拖动限制区域 var dragWidthLimit = 350; var dragHeightLimit = 200; dragRegion = ne...

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

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

...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, _fish.rotation); if (_fish.hitTestPoint(_...

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

179. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 70%]

...口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Conf.App_Width, Conf.App_Height); //创建TiledMap地图 this.tMap.createMap("map/"+mapname+".json",viewRect, laya.utils.Handler.create(this, this.test));//, null, new Laya.Point(1600, 816)); } private test(){ var testLayer:Laya.MapLay...

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

180. [LayaAir2] 在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 70%]

...eo.loop = true; var texture2D = new Laya.Texture2D(videoTexture.video.videoWidth,videoTexture.video.videoHeight); var texture:Laya.Texture = new Laya.Texture(texture2D); var image:Laya.Image = new Laya.Image(); image.texture = texture; image.width = videoTexture.video.videoWidth; image.height = vide...

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