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

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

11. 半透明的矩形鼠标穿透问题 [ 93%]

...透问题 //画矩形 this.addLabel = new Sprite(); this.addLabel.graphics.drawRect(0, 730, 1440, 170, "#000000"); this.addLabel.alpha = 0.6; this.addLabel.mousethrough = false; this.addLabel.mouseEnabled = true; sp.addChild(this.addLabel); 仍然能够点击下面的按钮.这个要怎么处理? 20...

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

12. Sprite-绘制各种形状 [ 91%]

...7, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 sp.graphics.drawRect(10, 166, 166, 90, "#ffff00"); //画多边形 sp.graphics.drawPoly(264, 166, [0, 0, 60, 0, 78.48, 57, 30, 93.48, -18.48, 57], "#ffff00"); //画三角形 sp.graphics.drawPoly(400, 166, [0, 100, 50, 0, 100, 100], "#ffff...

来源: Laya_示例 发布时间: 20251130

13. Sprite-绘制各种形状 [ 91%]

...7, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 sp.graphics.drawRect(10, 166, 166, 90, "#ffff00"); //画多边形 sp.graphics.drawPoly(264, 166, [0, 0, 60, 0, 78.48, 57, 30, 93.48, -18.48, 57], "#ffff00"); //画三角形 sp.graphics.drawPoly(400, 166, [0, 100, 50, 0, 100, 100], "#ffff...

来源: Laya2.0_示例 发布时间: 20251130

14. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 91%]

...a var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.pos(100,100) mask.graphics.endFill(); sp.mask=mask ``` **Laya...

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

15. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 91%]

...a var sp:Sprite=new Sprite(); sp.graphics.beginFill(0xFFFF00); sp.graphics.drawRect(0,0,200,200); sp.graphics.endFill(); addChild(sp); var mask:Sprite=new Sprite(); mask.graphics.beginFill(0xFF0000); mask.graphics.drawCircle(0,0,50); mask.pos(100,100) mask.graphics.endFill(); sp.mask=mask ``` **Laya...

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

16. viewport 的用法 [ 91%]

...ot.__super.call(this);       this.size(200,200);       this.graphics.drawRect(0,0,200,200,'#123456');       var viewPort = new Rectangle(0,0,200,200);             this.viewport = viewPort;       var ccc = new Sprite();       ccc.graphics.drawRect(0,0,50,50,'#123000');       t...

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

17. hitArea怎么用 [ 91%]

...Area怎么用 var container = new Sprite();         container.graphics.drawRect(0,0,640,1136,'#ff0000');         container.size(640,1136)         Laya.stage.addChild(container);                       var bg2Sprite =  new Sprite();         bg2Sprite.graphics.drawRect(0,0,...

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

18. 屏幕适配-缩放-No Border [ 90%]

...{ const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBORDER();mo...

来源: Laya2.0_示例 发布时间: 20251130

19. 屏幕适配-缩放-No Scale [ 90%]

...{ const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSCALE();mod...

来源: Laya2.0_示例 发布时间: 20251130

20. 屏幕适配-缩放-No Scale [ 90%]

...); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite;...

来源: Laya_示例 发布时间: 20251130