大约有 2,033 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0052 秒)
Laya_社区(1424) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(44) Laya2.0_api(7) laya_api(6)
怎么对动画进行毎帧侦听? ani.on(Laya.Event.COMPLETE, this, _OnComplete); function _OnComplete() { var bounds = ani.getGraphicBounds(); console.log(bounds.width); console.log(bounds.height); } 这样的话获取动画宽高 还是只会取到第一帧宽高 并没有办...
来源: Laya_社区 发布时间: 20170704
...交 1 个回复 w1114367261 赞同来自: laya.stage.on(Event.MOUSE_DOWN,this,加载图片的方法) public function 加载图片的方法():void{ var s:sprite = new sprite(); s.skin = "图片路径"; laya.stage.addChild(s); } 2018-04-16 0 0 分享 微博 QZONE 微信 为什么被折...
来源: Laya_社区 发布时间: 20180416
...加载所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffcccc"); //给panel设置宽高 panel.size(100,100); ...
来源: Laya2.0_文档 发布时间: 20210715
...300, 200, 50, 50, "#000"); Block.pos(300, 100); Block.on(Event.MOUSE_DOWN, this, function() { console.log(1); }); 点击无效,但我给用 Laya.stage.on(Event.MOUSE_DOWN); 是有效的 什么原因了?谢谢解答 2017-03-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...
来源: Laya_社区 发布时间: 20170324
...画布上显示,需要调用其他的函数,刷新吗 var itemlevel = this.tiledMap.getLayerByName(layerName); if (itemlevel == null) { return; } itemlevel.addChild(); 2019-06-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...
来源: Laya_社区 发布时间: 20190612
初学者问题 Dialog的popup()方法没有起到效果 this.btn_reg.on(Laya.Event.CLICK,null,()=> { var dlg : MyDialog = new MyDialog("注册功能暂未开通!"); dlg.popup(true); Laya.stage.addChild(dlg); }); 2018-03-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...
来源: Laya_社区 发布时间: 20180305
...或者让下面的box 不受光 var blinnPhongMaterial = this.m_rotateBox.meshRender.material as Laya.BlinnPhongMaterial //禁止受光的部分 //blinnPhongMaterial.disableLight() 就没有问题 附件 : --> 2018-06-28 添加评论 已悬赏2元...
来源: Laya_社区 发布时间: 20180628
...rivate 只是编译器约束,用TS编译好JS给别人用,都是挂在this或原型上,private 不应该是闭包域里的普通变量么 附件 : --> 2019-02-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回...
来源: Laya_社区 发布时间: 20190225
...类 在ide编辑模式中使用 运行demo 按F12 生成 代码如下/**This class is automatically generated by LayaAirIDE, please do not make any modifications. */ import SceneBase from '../SceneBase' import View=Laya.View; import Dialog=Laya.Dialog; var REG: Function = Laya.ClassUtils.regClass...
来源: Laya_社区 发布时间: 20190418
...可以用 __JS__ 直接执行js代码 例如:var cls:Class = __JS__("this.__proto__.__class"); 想问一下 ts项目是否有类似的api可以调用 2021-01-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回...
来源: Laya_社区 发布时间: 20210106