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

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

81. 加上size设置后,精灵不能点击. [ 73%]

... "img/flower2.png" : "img/flower3.jpg" img.loadImage(s); img.on(Laya.Event.CLICK, this, () => { img.y -= 10; }) img.pos(100, 300) Laya.stage.addChild(img) } function createFlower() { var f = new Laya.Sprite(); var r = Math.random(); var s = r > 0.66 ? "img/flower1.jpg" : r > 0.33 ? "img/flo...

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

82. 鼠标点击无效 [ 73%]

...提交 1 个回复 YuJungLi 赞同来自: 13995580072 点击? Laya.Event.CLICK   2017-11-21 1 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 13995580072 相关问题 Dialog:屏蔽点击Dialog之外的区域关闭弹框 请问有没有...

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

83. 分享:销毁龙骨动画! [ 73%]

...ddBtn.x = 250; addBtn.y = 50; Laya.stage.addChild(addBtn); DesBtn.on(Event.CLICK, this, onDesBtn); addBtn.on(Event.CLICK, this, onAddBtn); } private function onDesBtn():void { destroy(); } private function onAddBtn():void { startFun(); } public function startFun():void { mAniPath = "Dragon/Dragon.sk...

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

84. LayaAir引擎与原生Flash的差异文档说明! [ 72%]

...e.graphics.endFill(); addChild(sprite); sprite.addEventListener(MouseEvent.CLICK,onClick); function onClick(evt:MouseEvent):void { trace("------aaa---------"); }LayaAir环境下: var sprite:Sprite = new Sprite(); //方法一------start sprite.graphics.drawRect(100,100,100,100,"#ff9900"); var hitar...

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

85. 分享:改变图片皮肤,保持图片原样宽高显示 [ 72%]

...(); image.skin="logo.png"; Laya.stage.addChild(image); Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { image.skin="bg.jpg"; } } }方法2:使用graphics.drawTexture的方式】 package { import laya.display.Sprite; import laya.events.Event; import laya.net.Loader; impor...

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

86. 区块地图-等角地图 [ 72%]

...SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createMap(); Laya.stage.on("click", this, onStageClick); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.cr...

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

87. Box绑定事件失效 [ 72%]

...个Box是在图集中定义的,然后在类中直接调用,给他绑定click事件,但是没有反应 2017-11-16 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 S123456123456 赞同来自: 嗯   问题已经...

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

88. 区块地图-等角地图 [ 72%]

...Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water....

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

89. 发现bug,update大问题!!!!!!!!! 2.13版本 [ 72%]

...false         this.rig.gravityScale = 6         this.view.m_jump.onClick(this, this.onJump)         this.view.m_left.on(Laya.Event.MOUSE_DOWN,this, this.onleft)         this.view.m_left.on(Laya.Event.MOUSE_UP,this, this.notleft)         this.view.m_right.on(Laya.Event.MOUSE_DOWN,...

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

90. sound manager在MOUSE_OVER事件中无法播放 [ 71%]

...tage.addChild(musicButton);              soundButton.on(Event.CLICK, this, this.onPlaySound);             musicButton.on(Event.CLICK, this, this.onPlayMusic);             //bug在这里:新增鼠标移入后播放音效,无法生效            ...

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