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

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

161. 鼠标穿透问题 [ 88%]

鼠标穿透问题 List上面加了一层SpriteSprite有设置size大小,mouseThrough设为true,为何还能穿过Sprite滑动List? 代码如下:package { import laya.display.Sprite; import laya.display.Stage; import laya.net.Loader; import laya.ui.Image; import laya.ui.List; import laya...

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

162. 动态创建img 或 sprite [ 88%]

LayaAir引擎 动态创建img 或 sprite let dd = new Laya.Sprite(); dd.graphics.drawTexture(this.img.texture, 0, 0, 750, 1334); dd.x = 50; dd.y = 50; this.addChild(dd);   this.img 绝对不为空,我想用一个sprite来画它,请问什么画(不是拷贝)?   2018-01-24 添加评论 ...

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

163. 在父sprite中添加子sprite ,移动父Spritesprite为什么不动? [ 88%]

在父sprite中添加子sprite ,移动父Spritesprite为什么不动? (function(){ // 配置数据 var data = configJSON; // 目标等级 var target = { "tower":{"level":1}, "aeroboat":{"level":1}, "mountain":{"level":1}, "statue":{"level":1}, "angel":{"level":1} }; var towerLel = target.to...

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

164. 为什么Laya.Panel的子节点在(0,0)位置会不显示呢? [ 88%]

....width = 800; panel.y = 30; panel.hScrollBarSkin = null; var sp = new Laya.Sprite(); panel.addChild(sp); sp.x = 0; sp.y = 0; // 用下面这组数据是可显示的 // sp.y = 1; // sp.x = 1; sp.graphics.drawRect(0, 0, 200, 200, "#00FF00"); Laya.stage.addChild(panel);   这个是我的代码,sp是...

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

165. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 88%]

...Text = Laya.Text;     import Image = Laya.Image;     import Sprite = Laya.Sprite;       export class SmartScale_T {           //适配模式         private modes:string = "exactfit";         //全局文本信息         private txt: Text...

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

166. 鼠标交互-拖动 [ 88%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Event = Laya.Event; var Rectangle = Laya.Rectangle; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var ApePath = ".....

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

167. 绘制形状时事件不触发 [ 88%]

...件不触发 function myRing(x,y,r1,color1,r2,color2) {         this.sprite = new Laya.Sprite();     this.sprite.on('mousedown', this, on_down);     this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2);     this.sprite.graphics.drawCircle(x, y, r1, color1, color1, 0);     functi...

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

168. graphics 问题 [ 88%]

...内容相关的链接 提交 3 个回复 cuixueying 赞同来自: var sp:Sprite=new Sprite(); sp.graphics.save(); var matrix:Matrix=new Matrix(); matrix.rotate(45); matrix.translate(100,100); sp.graphics.transform(matrix); sp.graphics.drawRect(0,0,200,100,"#FF0000"); sp.graphics.restore(); Laya.stag...

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

169. 请问如何在Sprite上显示文本 [ 88%]

请问如何在Sprite上显示文本 请问如何在Sprite上显示文本,比如我用Sprite加载了一个砖块图片,想在这个砖块上显示对应的分数 2018-03-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交...

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

170. 绘制圆形与扇形(TypeScript-LayaAir基础篇(TS)-矢量图) [ 88%]

...形,示例代码如下: ```javascript module laya {     import Sprite = Laya.Sprite;     import Stage = Laya.Stage;     import WebGL = Laya.WebGL;        export class Sprite_DrawShapes {         private sp: Sprite;            constructor()   ...

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