大约有 898 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0062 秒)
Laya_社区(538) Laya3.0_api(153) Laya2.0_api(97) laya_api(63) Laya2.0_文档(31) Laya3.0_文档(15) Laya2.0_示例(1)
Laya事件不能添加给多边形吗? var clickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100, "#ffffff" ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, function(){ console.log( 'adf' ) } ); 我创建一个多边...
来源: Laya_社区 发布时间: 20180201
hit事件执行效率探讨 第一次做策略游戏,遇到的一个问题想跟大家探讨一下。 游戏中不太需要特别灵敏的碰撞,但是相对的怪物数量与伤害源数量会比较多。 所以有了下面的小想法,先看下图: 传统HIT方法: 修改后的rec...
来源: Laya_社区 发布时间: 20170708
...毁自己本身。 Node event(type:String, data:* = null):Boolean 派发事件。 EventDispatcher frameLoop(delay:int, caller:*, method:Function, args:Array = null, coverBefore:Boolean = true):void 定时重复执行某函数(基于帧率)。功能同Laya.timer.frameLoop()。 Node frameOnce(delay...
来源: laya_api 发布时间: 20170929
...与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 派发事件时若 Stage.focus 为空则只从 Stage 上派发该事件,否则将从 Stage.focus 对象开始一直冒泡派发该事件。所以在 Laya.stage 上监听键盘事件一定能够收到,如果在其他地方监听...
来源: Laya_社区 发布时间: 20180208
...毁自己本身。 Node event(type:String, data:* = null):Boolean 派发事件。 EventDispatcher frameLoop(delay:int, caller:*, method:Function, args:Array = null, coverBefore:Boolean = true):void 定时重复执行某函数(基于帧率)。功能同Laya.timer.frameLoop()。 Node frameOnce(delay...
来源: laya_api 发布时间: 20170929
使用loadImage加载一个图片后的点击事件 var Sprite = Laya.Sprite; var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage(img,360, 300, 60, 60, Laya.Handler.create(this, function(){ ape.on(Laya.Event.CLICK, this, function(){ console.log(111) }) }));...
来源: Laya_社区 发布时间: 20180609
...触发函数 this.socket.on(Laya.Event.CLOSE, this, closeHandler); //关闭事件 this.socket.on(Laya.Event.ERROR, this, errorHandler); //连接出错 function openHandler(event){ //正确建立连接 this.socket.send('foo','OOOO'); } function receiveHandler(msg){ console.log(event); //接收到数...
来源: Laya_社区 发布时间: 20180509
layaide建的ui里面的按钮怎么获取到呢?事件怎么添加呢? ListDemoView = new startViewUI(); Laya.stage.addChild(ListDemoView); var btn = ListDemoView.getChildByName("startbtn"); btn.on(Event.CLICK, this, clickHandler); 这样不行 2018-05-24 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20180524
Tween动画中的Sprite点击事件失效 Tween动画中的Sprite点击事件失效 Tween动画中的Sprite点击事件失效: 简单代码: var self = this; self.loserPrize.on(Laya.Event.MOUSE_DOWN,self,function(){ self.clickHanlder(); }) Laya.Tween.to(self.loserPrize, { y: Laya....
来源: Laya_社区 发布时间: 20180222
...oad(content:* = null):void 结束加载,处理是否缓存及派发完成事件 Event.COMPLETE 。 Loader event(type:String, data:* = null):Boolean 派发事件。 EventDispatcher getAtlas(url:String):Array[static] 获取指定资源地址的图集地址列表。 Loader getRes(url:String):*...
来源: Laya2.0_api 发布时间: 20190513