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

大约有 264 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0038 秒)

31. Sprite-绘制各种形状 [ 85%]

...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_示例 发布时间: 20241118

32. 透明区域点击问题 [ 85%]

...1 2、代码的写法: var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100,100,100,100,"#ff9900"); var hitarea:HitArea = new HitArea(); var graphics:Graphics = new Graphics(); graphics.drawRect(100,100,100,100,"#ff9900"); hitarea.hit = graphics; sprite.hitArea = hitarea; 2017-04-28 0 0 ...

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

33. 龙骨动画-拖拽-点击区域HitArea设置问题 [ 84%]

...r hitArea = new Laya.HitArea(); var graphic = new Laya.Graphics(); graphic.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.height); hitArea.hit = graphic; skeleton.hitArea = hitArea; Laya.stage.graphics.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.height, "#FFFFFF"...

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

34. graphics 问题 [ 84%]

...45); matrix.translate(100,100); sp.graphics.transform(matrix); sp.graphics.drawRect(0,0,200,100,"#FF0000"); sp.graphics.restore(); Laya.stage.addChild(sp);我测试没有问题,可以把你详细的代码发下,我们看下! 2017-06-09 0 0 分享 微博 QZONE 微信 raytrace 赞同来自: (fun...

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

35. 屏幕适配-缩放-No Scale [ 84%]

...); })(); 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_示例 发布时间: 20241118

36. 屏幕适配-缩放-No Border [ 84%]

...); })(); 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_示例 发布时间: 20241118

37. 屏幕适配-缩放-Show All [ 84%]

...); })(); 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_示例 发布时间: 20241118

38. 屏幕适配-缩放-Extract Fit [ 84%]

...); })(); 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_示例 发布时间: 20241118

39. Sprite graphics的显示比例问题 [ 84%]

...graphics.drawCircle(100, 100, 100, null, "#ff0000", 1); character.graphics.drawRect(0, 0, 200, 200, null, "#0000ff", 1); character.graphics.drawRect(20, 20, 160, 160, null, "#0000ff", 1); character.x = 220; character.y = 220; character.pivot(100,100); // character.scale(0.5, 0.5); Laya.stage.addChil...

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

40. 请教sprite的hitArea怎么设置 [ 84%]

...ing • 2017-02-22 17:13 var sprite:Sprite = new Sprite(); sprite.graphics.drawRect(100,100,100,100,"#ff9900"); var hitarea:HitArea = new HitArea(); var graphics:Graphics = new Graphics(); graphics.drawRect(100,100,100,100,"#ff9900"); hitarea.hit = graphics; sprite.hitArea = hita...

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