大约有 1,038 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0055 秒)
Laya_社区(609) Laya2.0_文档(86) Laya3.0_api(75) Laya2.0_api(62) laya_api(57) Laya2.0_示例(53) Laya_示例(49) Laya3.0_文档(47)
...(btn); //设置Button相关的属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } } } ``` 上述代码运行效果如动图2所示:  (动图2) **Tips:** Button 组件的属性接口介绍请参考 [Button API](https://layaair2.ldc2.layabox.com/ap...
来源: Laya2.0_文档 发布时间: 20210715
...已创建完毕,此方法只执行一次 */ onAwake(): void { this.txt.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txt.size(500, 30); //大小 this.txt.pivot(this.txt.width/2, this.txt.height/2); //轴心点 this.txt.text = "大家好,欢迎各位开发者使用...
来源: Laya3.0_文档 发布时间: 20251010
...动画的pivot动画 tl2.play(0,true,"pivot"); //动画的显示位置 tl2.pos(300,0); } ``` 示例代码运行效果如动图31所示: (动图31) ### 3.4 在UI中使用时间轴动画,然后在项目代码中调用。 #### 3.4.1 创建UI页,添加Animation动画到场景中...
来源: Laya2.0_文档 发布时间: 20210715
...;//把接收到的二进制数据读进byte数组便于解析。 this.byte.pos = 0;//设置偏移指针; trace('getInt16=',this.byte.getInt16()); trace('getInt32=',this.byte.getInt32()); trace('getString=',this.byte.getString()); } private function closeHandler(e:Object= null):void { //关闭事...
来源: Laya_社区 发布时间: 20180202
...名称,以字符串形式表示 txt.leading = 5; // 垂直行间距 txt.pos(Laya.stage.width - txt.width >> 1, Laya.stage.height - txt.height >> 1); } } new Text_BitmapFont(); 结果截图: 2019-02-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...
来源: Laya_社区 发布时间: 20190225
...动画的pivot动画 tl2.play(0,true,"pivot"); //动画的显示位置 tl2.pos(300,0); } } new GameMain(); ``` 示例代码运行效果如动图31所示: (动图31) ### 3.4 在UI中使用时间轴动画,然后在项目代码中调用。 #### 3.4.1 创建UI页,添加Animation...
来源: Laya2.0_文档 发布时间: 20210715
...加载时报错,就是这里: laya.core.js的7430行 if (this._pos_+2 > this._length)throw "getUint16 error - Out of bounds"; 但是,不使用预加载,就不报错,只是不知道什么时候真的加载完成,那个_template不再为null,我就可以调用play了。 怎...
来源: Laya_社区 发布时间: 20180622
...画的pivot动画 tl2.play(0, true, "pivot"); //动画的显示位置 tl2.pos(300,0); } } } ``` 示例代码运行效果如动图31所示:  (动图31) #### ### 3.4 在UI中使用时间轴动画,然后在项目代码中调用。 #### 3.4.1 创建UI页,添加Animation动...
来源: Laya2.0_文档 发布时间: 20210715
...aphics.drawCircle(80,80,50,"#ff0000"); //圆形所在的位置坐标 cMask.pos(120,50); //实现img显示对象的遮罩效果 img.mask = cMask; } })(); ``` 运行效果如图3所示:  (图3) 通过对比代码我们发现,实现遮罩很简单,把创建的显示对象cMa...
来源: Laya2.0_文档 发布时间: 20210715
...;//把接收到的二进制数据读进byte数组便于解析。 this.byte.pos = 0;//设置偏移指针; ////下面开始读取数据,按照服务器传递过来的数据,按照顺序读取 var a:number = this.byte.getByte(); var b:number = this.byte.getInt16(); var c:number = this.byte.getFlo...
来源: Laya2.0_文档 发布时间: 20210714