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

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

91. 面板容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

...法只执行一次 onAwake(): void { this.panel.pos(100, 100); this.panel.size(200, 200); this.panel.scrollType = Laya.ScrollType.Both; //滚动类型:水平与垂直都滚动 this.panel.vScrollBarSkin = "atlas/comp/vscroll.png"; this.panel.hScrollBarSkin = "atlas/comp/hscroll.png"; this.panel.ela...

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

92. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 65%]

...aya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEv...

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

93. 鼠标交互-滑动 [ 65%]

...要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; button.on(Event.MOUSE_DOWN, this, onMouseDown); Laya.stage.addChild(button); //左侧临界点设为圆形初始位置 beginPositio...

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

94. 鼠标交互-滑动 [ 64%]

...收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / 2; this.button.y = Laya.stage.height / 2; this.button.on(Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.addChild(this.button); //左侧临界点设为圆形...

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

95. 文本-滚动文本 [ 64%]

...发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.size(200, 100); txt.x = Laya.stage.width - txt.width >> 1; txt.y = Laya.stage.height - txt.height >> 1; txt.borderColor = "#FFFF00"; txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, ...

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

96. timer.loop里面修改Text.text在微信小程序上用iPhone打开出现闪屏 [ 64%]

...题,  this.myTest = new Laya.Text() this.myTest.pos(0, 0) this.myTest.size(100, 100) this.myTest.fontSize = 13 this.myTest.color = "#ffffff" this.myTest.align = "center" this.addChild(this.myTest) this.timer.loop(10, this, this.timerClick)     timerClick() {   this.myTest.changeText("改变的...

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

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

...e = "label";//设置 label 的name属性值。      *         label.size(100, 20);//设置 label 的宽度、高度。      *         this.addChild(label);//将 label 添加到显示列表。      *     };      *     Laya.class(Item,"mypackage.listExample.Item",_super);//注...

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

98. 文本-滚动文本 [ 64%]

...商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; this.txt.size(200, 100); this.txt.x = Laya.stage.width - this.txt.width >> 1; this.txt.y = Laya.stage.height - this.txt.height >> 1; this.txt.borderColor = "#FFFF00"; this.txt.fontSize = 20; this.txt.color = "#ffffff"; this.txt.on(Event...

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

99. 预加载进入游戏界面 [ 64%]

...数组:["a.png","b.png"];复杂数组[{url:"a.png",type:Loader.IMAGE,size:100,priority:1},{url:"b.json",type:Loader.JSON,size:50,priority:1}]。          * @param    complete    加载结束回调。根据url类型不同分为2种情况:1. url为String类型,也就是单个资源...

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

100. Uncaught TypeError: Cannot read property 'XXX' of undefined [ 63%]

...dth = 512;             spe.height = 512;             spe.size(512, 512);             Laya.stage.addChild(spe);             spe.graphics.drawRect(0, 0, 515, 515, "#996633", "#333333");             spe.on(Event.MOUSE_DOWN, spe, onMouseDown);         ...

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