大约有 29 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
... Laya.Text }) txt: Laya.Text; constructor() { super(); } onAwake(): void { this.txt.text = "第{n=1}页"; //显示文本的初始化内容 } onStart(): void { let page: number = 1; Laya.timer.frameLoop(10, this, () => { page += 1; //在定时器中让变量page每次自增1 this.txt.setVar("n", p...
来源: Laya3.0_文档 发布时间: 20251010
...a.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this.showLogger(); this.text.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact";...
来源: Laya3.0_文档 发布时间: 20251010
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hscroll.skin = "atlas/comp/hscroll.png";//滚动条皮肤 this.hscroll.width = 300;//滚动条的宽度 this.hscroll.pos(300, 300);//滚动条的位置 this.hscroll.min = 0;//滑块的最小滚动位置 this.hscroll.max = ...
来源: Laya3.0_文档 发布时间: 20251010
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vscroll.skin = "atlas/comp/vscroll.png";//滚动条皮肤 this.vscroll.width = 300;//滚动条的宽度 this.vscroll.pos(300, 300);//滚动条的位置 this.vscroll.min = 0;//滑块的最小滚动位置 this.vscroll.max = ...
来源: Laya3.0_文档 发布时间: 20251010
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.progressBar.value = 0.01; //初始进度值 this.loadText.text = "资源加载中……"; // 测试加载效果 Laya.timer.loop(100, this, this.changeProgress); } //这里仅模拟加载演示效果 changeProgress(): void ...
来源: Laya3.0_文档 发布时间: 20251010
....Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); }...
来源: Laya3.0_文档 发布时间: 20251010
...ope_Sample { private info: Laya.Text; constructor() { Laya.init(550, 400); this.info = new Laya.Text(); this.info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(this.info); Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, this....
来源: Laya3.0_文档 发布时间: 20251010
...vate displayText: Laya.Text; // 文本显示当前时间 onAwake(): void { this.lightComp = this.owner.getComponent(Laya.DirectionLight2D); // 初始化文本组件 this.displayText = new Laya.Text(); this.displayText.color = "#ffffff"; this.displayText.font = "Arial"; this.displayText.fontSize = 24...
来源: Laya3.0_文档 发布时间: 20251010
...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.lab.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.lab.size(500, 30); //大小 this.lab.pivot(this.lab.width/2, this.lab.height/2); //轴心点 this.lab.text = "大家好,欢迎大家来到...
来源: Laya3.0_文档 发布时间: 20251010
...文本节点失去焦点时执行回调,发送数据 onAwake(): void { this.owner.on(Laya.Event.BLUR, this, this.sendData) } //将玩家数据上传至云端 sendData() { //组织数据 let KVDataList = []; let text = Number(this.owner.text); if(!isNaN(text) && text >= 0 && text...
来源: Laya3.0_文档 发布时间: 20251010