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

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

1641. 关于mouseThrough设计原理问题? [ 72%]

...hrough = false;设置是没有效果的,这样设计是不是有问题?var a:Sprite = new Sprite(); a.graphics.drawRect(0,0,200, 200, "#00ff00"); a.size(200, 200); a.pos(0, 0); a.on(Event.CLICK, null, function(e:Event):void{ trace("click a"); }) Laya.stage.addChild(a); var b:Sprite = new Sprite(...

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

1642. as还能用getChildByName方法吗? [ 72%]

...相关的链接 提交 2 个回复 anlijames 赞同来自: 之前是写的 var b = Laya.stage.getChildByName("egg"+i); 改成 var b:Sprite = Laya.stage.getChildByName("egg"+i); 就好用啦,哈哈哈 2017-05-17 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 可以如此使用,你可...

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

1643. js进度,进度,js场景进度效果 [ 72%]

js进度,进度,js场景进度效果 new function() { var className = 'Game'; window[className] = (function(original) { function Class() { this.arr = [ "res/atlas/lucky8.json", "res/atlas/lucky8/lewinlineicons.json", "res/atlas/lucky8/setting.json", "res/atlas/lucky8/setView.json", "res/atlas/lucky...

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

1644. canvas下资源清理的问题 [ 72%]

...c class LayaUISample {                           private var btn1:Button;         private var btn2:Button;                  private var taskView:TaskUI;                           public function LayaUISample() {             //初始化...

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

1645. laya.d3.core.scene.BaseScene [ 72%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精...

来源: laya_api 发布时间: 20170422

1646. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 72%]

...alse,false); //通过弧度和速度计算角色在x,z轴上移动的量 var speedX:number = Math.sin(this.rocker.radians) * this.speed; var speedZ:number = Math.cos(this.rocker.radians) * this.speed; //记录角色本帧的角度 this.lastAngle = this.rocker.angle; //行走区域碰撞检测,...

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

1647. 使用webgl之后toDataUrl返回黑色的图像 [ 72%]

...ya.utils.Stat; import laya.webgl.WebGL; public class LayaAirDemo { private var sp:Sprite ; public function LayaAirDemo() { //初始化引擎 Laya.init(Browser.width, Browser.height,WebGL); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name...

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

1648. IDE创建动画调用问题 [ 72%]

...phicNode的初始skin,请问应该怎么获取到这个GraphicNode?   var light: Laya.Animation = new Laya.Animation(); light.loadAnimation("ani/thunder.ani"); Laya.stage.addChild(light); light.play(0, true); 用light.frames获取结果为null,不行 2017-08-03 添加评论 免费帖 --> 分...

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

1649. drawToCanvas在百度小游戏无法获得图像 [ 72%]

drawToCanvas在百度小游戏无法获得图像 * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 * var sp:Sprite = new Sprite();//创建精灵 * sp.graphics.drawTexture(htmlCanvas.getTexture());//把截图绘制到精灵上 * Laya.stage.addChild(sp...

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

1650. 请教——layabox如何加载多个图集 [ 72%]

...关的链接 提交 1 个回复 叮当(H5研发) 赞同来自: Lancer var arr =[{url:"game/img.jpg",type: Loader.IMAGE}, {url:"res/atlas/comp.atlas", type: Loader.ATLAS}, {url:"res/atlas/all.atlas", type: Loader.ATLAS} ]; Laya.loader.load(arr,Laya.Handler.create(this,onload)); 2018-08-09 1 1 分...

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