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

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

1841. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 76%]

..._owner不为null if(_isScal&&_owner) { _owner.on(Event.MOUSE_DOWN,this,onDown); } else { return; } } public function get isScale():Boolean { return _isScal; } public function set isScale(isScal:Boolean):void { this._isScal=isScal; } private function onDown():void { //按下,按钮进行缩...

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

1842. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 76%]

...是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObject): void { console.log("点击了对象:" + item.title); //获得这个对象在列表中的索引的...

来源: Laya3.0_文档 发布时间: 20251128

1843. destroyChildren 销毁对象后为什么依旧能取得内部属性 removeChildren destroyChildren的区别 [ 76%]

...mBtn();//这个对象内部有一个属性为testNum;             this.addChild(_bottomBtn);             trace("测试1 = " + _bottomBtn.testNum + "-" + _bottomBtn);// 测试1 = 1-[object Object]             this.removeChildren();             trace("测试2 = " + ...

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

1844. 怎么给UI上的Label 的text赋值 [ 76%]

...19-05-20 15:11 浏览: 2212 关注: 3 人 Supermang42 • 2018-08-10 14:17 this.sx.text = " xxx "; Supermang42 • 2018-08-10 14:17 this ← 是你的UI Lancer • 2018-08-10 17:04 @Supermang42:我添加Laya.stage.addChild(this)之后,text才被赋值,但是把先前addChild()的内容...

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

1845. 什么情况下Tween缓动会停止?除了暂停函数外 [ 76%]

...报错,非必现。 //播开始动画 var kaishi = new StartAnimView(); this.addChild(kaishi); kaishi.playAnim(); this.anim_array.push(kaishi);  Laya.timer.once(1700, this, function () { kaishi.onDestroy(); kaishi.destroy(true);   两个脚本是相互独立的。 2020-01-13 添加评论 免费...

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

1846. 模拟鼠标事件 [ 76%]

...n() { //初始化引擎 Laya.init(600,400); //手动调stage的click事件 this.onClick(); //给stage监听点击事件 Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { trace("test!"); } } } 2017-06-07 0 3 分享 微博 QZONE 微信 Playerdata1 赞同来自: 谢谢楼上...

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

1847. 区块地图-PerspectiveWall [ 76%]

...E; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.bgColor = "#232628"; this.createMap(); } private createMap(): void { this.tiledMap = new TiledMap(); this.tiledMap.createMap("../../res/tiledMap/perspective_walls.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } } } new l...

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

1848. UI编辑器里面创建了一个Graphics line,如何能获取组件编辑的的 points数据 [ 76%]

...请: 与内容相关的链接 提交 2 个回复 nevercai 赞同来自:  this.owner.graphics["_one"]    JS就是这点强大,什么都能访问,管你什么private,protected,还能覆盖原有的方法,属性。 2019-02-28 0 0 分享 微博 QZONE 微信 安 赞同来自: this.graphics._...

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

1849. 请问图片大小可以手动设置宽高吗?怎么设置,看到API里的Sprite的width和height无法设置,只用于碰撞检测 [ 76%]

... 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: this.bg_img.skin = "ui/bg.jpg"; this.bg_img.width = Laya.stage.width; this.bg_img.height = Laya.stage.height; Image使用skin修改显示,改变宽高时,会拉伸显示内容 2018-01-22 0 0 分享 微博 QZONE 微信 为...

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

1850. 关于js继承类class的参数问题 [ 76%]

...{      *     function Item(){      *         Item.__super.call(this);//初始化父类      *         this.graphics.drawRect(0, 0, 100, 20, "#ff0000");      *         var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。      *         lab...

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