大约有 1,038 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0052 秒)
Laya_社区(609) Laya2.0_文档(86) Laya3.0_api(75) Laya2.0_api(62) laya_api(57) Laya2.0_示例(53) Laya_示例(49) Laya3.0_文档(47)
...eLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); private function dispose():void { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的...
来源: Laya2.0_文档 发布时间: 20210715
...frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在相对布局中,...
来源: Laya2.0_文档 发布时间: 20210715
... Laya.stage.addChild(this.skeleton); this.skeleton.pos(laya_width/2,laya_height/2); this.skeleton.scale(0.5, 0.5); this.skeleton.on(Event.STOPPED, this, this.play); this.play(); } onError() { console.log("parse error...
来源: Laya_社区 发布时间: 20211013
...已创建完毕,此方法只执行一次 onAwake(): void { this.checkbox.pos(300, 300); // this.checkbox.selected = true; this.checkbox.label = "多选框"; this.checkbox.labelBold = true; this.checkbox.labelSize = 30; this.checkbox.labelColors = "#0100ff, #16fa0e, #ff0000"; //各状态下的文...
来源: Laya3.0_文档 发布时间: 20251010
...置为粗体 txt.bold = true; //设置文本的显示起点位置X,Y txt.pos(60, 100); //设置舞台背景色 Laya.stage.bgColor = '#23238E'; //将文本内容添加到舞台 Laya.stage.addChild(txt); } } new GameMain(); 海货 • 2018-07-15 16:17 上边是代码 wq • 2018-08-01 14:00 那不是...
来源: Laya_社区 发布时间: 20180715
...换纹理绘制 img.on("click",this,switchImg); //设置图片坐标 img.pos(100,50); } private function switchImg(e:*=null):void { //清空绘制 img.graphics.clear(); //获得要切换的图片资源路径 var imgUrl:String = (flag = !flag)? monkey2:monkey1; //获取图片资源 var texture:Textur...
来源: Laya2.0_文档 发布时间: 20210715
... Returns DrawTextureCmd | null drawTextures drawTextures(texture: Texture, pos: any[], colors?: number[]): DrawTexturesCmd | null Defined in laya/display/Graphics.ts:255 批量绘制同样纹理。 Parameters texture: Texture 纹理。 pos: any[] 绘制次数和坐标。 Optional colors: number[] ...
来源: Laya3.0_api 发布时间: 20231115
...meshSprite添加阴影属性无效 合并小图片 Text类中竟然没有pos函数的api~ laya怎么跨域加载图片 问题状态 最新活动: 2017-11-08 17:39 浏览: 929 关注: 2 人 Monica • 2017-11-08 20:17 sprite默认是没有宽高的,需要手动设置宽高,你可以先断点看...
来源: Laya_社区 发布时间: 20171024
...= new Sprite(); flower.loadImage("res/ui/npc/budai/stand_ld1.png"); flower.pos(budai.x, budai.y); flower.alpha=1; flower.pivotX=25; flower.pivotY=80; flower.zOrder = budai.y; flower.autoSize = true; flower.height = 100; flower.width = 100; flower.size(100,100); flower.on(Laya.Event.CLICK,this,functi...
来源: Laya_社区 发布时间: 20180722
...e(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精灵并把它放倒200位置 sp.graphics.drawTexture(texture);//把截图绘制到精灵上 Laya.stage.addChild(sp);//把精灵显示到舞台 也可以获取原始图片数据,分享到网上,从而...
来源: laya_api 发布时间: 20170422