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

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

221. 【简单跑酷--JS版】---Lv.6 终篇 [ 54%]

...init = function(){ //黑色背景 this.bg = new Sprite(); this.bg.graphics.drawRect(0,0,Config.GameWidth,Config.GameHeight,"#000000"); this.addChild(this.bg); //loading文本 this.txt = new Text(); this.txt.color = "#ffffff"; this.txt.fontSize = 30; this.txt.text = "Loading"; this.txt.width = Config...

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

222. 分享:销毁龙骨动画! [ 54%]

...= 40; var button:Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2 , 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } private function parseComplete(fac:Templet):void { //创建模式...

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

223. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 54%]

...0;  var button: Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; }  //private musicString:string = "./sounds/心跳的证明.mp3"; pr...

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

224. ios15遮罩引起的黑屏在1.x的版本上如何解决 [ 54%]

... var maskArea:Sprite = new Sprite(); maskArea.alpha = 0; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.setName("maskArea") mask.addChild(maskArea);   //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 highLightArea = new ...

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

225. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 54%]

...tePanel():void { let panel:Laya.Sprite = new Laya.Sprite(); panel.graphics.drawRect(0,100,100,20,0xffffff); this.addChild(panel); let box:laya.physics.BoxCollider = panel.addComponent(laya.physics.BoxCollider); box.height = 20; box.width = 100; let rigid:Laya.RigidBody = panel.addComponent(Laya.Rigi...

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

226. 移动Sprite时,边缘闪烁 [ 54%]

... function tankSprite() { this.speed_x = 3; this.speed_y = 4; this.graphics.drawRect(0, 0, 90, 90, '#aabbcc', '#bbccdd', 1); Laya.stage.addChild(this); var lastTimestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTime...

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

227. 扇形遮罩画不全画了一个很奇怪的形状但是矩形的就没问题。显示效果如下:版本号1.7.10 [ 54%]

...        }                         maskSp.graphics.drawRect(0, 0, w, height, '#ffffff');                 }             }         }                  public function setPercentage(p:Number):void         {             this.per...

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

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

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

229. 最新版本绘制100x100个sprite ios不能显示 [ 53%]

...t; this.MapColNum; j++){ var box = new laya.display.Sprite(); box.graphics.drawRect(0, 0, 30, 30, null, "#e6e4ef", 1); box.x = i * 30; box.y = j * 30; boxSp.addChild(box); } } boxSp.cacheAs = "bitmap"; this.addChild(boxSp); } boxSp.cacheAs = "bitmap"; 如果去掉这句话可以显示 是内部设...

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

230. 关于遍历产生的sprite的点击事件,急,大神帮看哈 [ 53%]

...MIDDLE; var sp; for(var i=0;i<5;i++){ sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,50,50,"red"); sp.y = i*60; sp.index=i; sp.size(50,50); sp.on(Laya.Event.CLICK,this, function (e) { alert(e.target.index); },[{target:sp}]) Laya.stage.addChild(sp); }   2017-02-21 1 0 分享 微博 QZONE 微信 a...

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