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

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

351. 父容器为何不响应鼠标事件 [ 81%]

父容器为何不响应鼠标事件 源码如下: let son:Laya.Sprite = new Laya.Sprite() let father:Laya.Sprite = new Laya.Sprite() son.loadImage("res/me.png",0,0,30,30) father.addChild(son)              Laya.stage.addChild(father) father.x = 100; father.y = 100; father.on(Laya.Even...

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

352. 封装类的时候 怎么在类中表示自身? [ 81%]

...装类的时候 怎么在类中表示自身? class BackGround extends Laya.Sprite{ constructor() { super(); new init(); function init() { var bg1 = new Laya.Sprite(); var bg2 = new Laya.Sprite(); //背景图 // box.loadImage("../bin/background.png"); // Laya.stage.addChild(box); bg1.loadImage("../bi...

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

353. 每过一秒下降一个单位如何写 [ 81%]

...请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: var sprite:Sprite = new Sprite; sprite.loadImage("图片路径"); Laya.timer.loop(1000,this,function(){ sprite.y += 1; }) 不知道是不是你想要的?   2016-11-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回...

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

354. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 81%]

...     import com.legend.manager.AppManager;       import flash.display.Sprite;     import flash.events.Event;     import flash.external.ExternalInterface;     import flash.net.URLVariables;     import flash.text.TextField;     import flash.text.TextFieldAutoSize;     import flash.tex...

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

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

...,然后在Laya中,获取这个矩形,并且向矩形中添加一个sprite。虽然矩形的位置已经在窗口中,但是sprite无法显示。请问问题出在哪里?   附件 : --> 2017-05-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

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

.../GitHub/TS_Laya/TS_MyLaya/bin/sounds/hit.wav]   测试代码:   import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import SoundManager = Laya.SoundManager; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.W...

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

357. 3D模型无法用Tween类吗 [ 81%]

3D模型无法用Tween类吗 //载入并显示模型 var layaMonkey: Laya.Sprite3D =Laya.Sprite3D.load("LayaMonkey/LayaMonkey.lh") as Laya.Sprite3D; scene.addChild(layaMonkey); layaMonkey.transform.localScale = new Laya.Vector3(0.001,0.001,0.001); layaMonkey.transform.localPosition = new Laya.Vecto...

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

358. 如何做一个心形的进度条? [ 81%]

...何做一个心形的进度条?   类似这样的。。我有试过用sprite遮罩处理。。但是发现添加好的sprite遮罩在代码中无法移动它的坐标。。导致没有进度条效果? 附件 : --> 2017-11-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

359. layaAir2.3克隆以及获取节点重大bug!!! [ 81%]

....Loader.getRes("res/my_res/guns_test.lh");          let a :Laya.Sprite3D = new Laya.Sprite3D();         a.addChild(guns_test.getChildAt(0).clone());         a.transform.translate(new Laya.Vector3(0,1.38,-60))//transform.localPositionX-=2;         a.transform.sc...

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

360. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 81%]

..._super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage("war/beijing.png"); this.addchild(this.bg);  }; Laya.class(BackGround,"BackGround",_super) return BackGround; })(Laya.sprite); BackGround.super(this);这个报错 Cannot read property 'call' of undef...

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