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

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

911. 抛click点击事件报错 [ 85%]

...ck点击事件报错 是不是只能抛自定义事件  比如let xx:Laya.Sprite = new Laya.Sprite(); xx.event(Laya.Event.Click);  然后会报错    因为要实现新手引导5秒自动点击功能 所以会抛出一个事件  这个貌似是基本功能 求解答 2018-05-25 添加评论 免...

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

912. [3.0.6]碰撞体不能以中心调节 [ 85%]

...节   目前想让碰撞体居中,需要用fitresize得到的值(估计是sprite的宽或高的最大值),减去碰撞体半径,再填入对应的偏移中才能让碰撞体居中. 再次调节半径值,需要再次修改偏移值,才能使碰撞居中.   请注意,默认行为不应该如此! 应...

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

913. graphics绘制报错 [ 85%]

graphics绘制报错 class Sprite_DisplayImage { constructor() { Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); const path = "./res/apes/monkey2.png"; Laya.loader.load(path, Laya.Handler.create(this, function() { let tex = Laya.loader.getRes(path); let sp = new Laya.Spr...

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

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

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

915. BoxCollider 不会随着父节点 翻转 scaleX=-1 [ 84%]

BoxCollider 不会随着父节点 翻转 scaleX=-1 给他Sprite 添加了 BoxCollider,在场景编辑器里设置了Sprite scaleX为-1,编辑器里显示Sprite和BoxCollider都有翻转 但在运行效果里BoxCollider却没有翻转? 2018-10-30 添加评论 免费帖 --> 分享 微博 QZONE ...

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

916. 颜色滤镜 差值变化 [ 84%]

...; private _targetsLastValue: number = null; private targets: Array<Laya.Sprite> = null; public static instance: ColorTool = null; private targetsFilter: Laya.ColorFilter = null; private _persent: number = 0; protected constructor() { this.targets = new Array<Laya.Sprite>(); } /** * 实...

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

917. 性能测试-卡通人物2 [ 84%]

...= 0) { text.text = Stat.FPS.toString(); } } } class Character extends Laya.Sprite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { const Animation =...

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

918. 点击事件疑问 [ 84%]

点击事件疑问 发现了精灵sprite 显示图片 如果是用loadImage的话 要接受鼠标事件 是不需要显示设置size的 如果是用sprite的graphic的drawTexture来显示图片 是需要显示设置size 才能接受鼠标事件 是不是这样 2017-02-10 添加评论 免费帖 --> ...

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

919. 类似于list下的按钮监听 !如何去做。 [ 84%]

类似于list下的按钮监听 !如何去做。 点击Sprite 可以监听到下面每个button点击事件从而做出不同的行为。。。这种 2018-06-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 18...

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

920. 关于graphics.drawPath手机端和PC端不一致的问题 [ 84%]

...入以下代码。 以下是ts文件的全部代码。module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import WebGL = Laya.WebGL; import Event = Laya.Event; export class Sprite_DrawShapes { private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(7...

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