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

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

341. 绘制矩形与圆角矩形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 81%]

...形,示例代码如下: ```java package {     import laya.display.Sprite;     import laya.display.Stage;            public class Sprite_DrawShapes     {         private var sp:Sprite;                    public function Sprite_DrawShapes() ...

来源: Laya2.0_文档 发布时间: 20210715

342. Tween回调方法里如何带参数? [ 81%]

...试没有问题,可以提供个例子我们看下 测试代码: var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); Laya.stage.addChild(sp); Tween.to(sp,{x:300,y:300,alpha:0.5},1000,null,Handler.create(this,function():void { sp.destroy(); })); Complete事件你没写错,...

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

343. event自定义事件的问题 [ 81%]

...成功,下面是testDemo LayaSample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public function LayaSample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisE...

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

344. 3d模型预加载后二次调用报错 [ 81%]

...二次调用报错 使用Laya.loader.create 预加载,第一次用Laya.Sprite3D.load("xxx.lh").getChildAt(0) 可以创建,第二次再调用Laya.Sprite3D.load("xxx.lh").getChildAt(0) 创建就返回undefined了,help~ 2018-03-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

345. 关于环形进度条,进度不能重置问题 [ 81%]

...per(this); this.angle = 0; Laya.timer.loop(200,this,this.loadProgress) var Sprite = Laya.Sprite; this.box = new Sprite(); this.box.cacheAs = "bitmap"; this.box.pos(0,0); this.say.addChild(this.box); this.draw = new Sprite(); this.box.addChild(this.draw); this.draw.graphics.drawPie(this.say.width/2, ...

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

346. 父容器为何不响应鼠标事件 [ 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

347. 多重遮罩显示异常 [ 81%]

...者消失,测试代码如下 export default class ClipView extends Laya.Sprite { constructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = ...

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

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

349. 版本号: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

350. matter中layasprite怎么改变图片大小? [ 81%]

matter中layasprite怎么改变图片大小?   var roleOptions: any = {mass:1, restitution:0.8, layaSprite: sprite}; var role: any = Matter.Bodies.rectangle(180, 450, 334, 522, roleOptions);   代码类似这样的:sprite是我传入的图片,要怎么改变这张图片的大小? 2018-08-...

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