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

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

1. 分享,扩展Laya.Text组件实现简单的富文本 [ 100%]

...m visibleLineCount */ renderText(begin, visibleLineCount) { var graphics = this.graphics; graphics.clear(true); var ctxFont = (this.italic ? "italic " : "") + (this.bold ? "bold " : "") + this.fontSize + "px " + (Browser.onIPhone ? (laya.display.Text._fontFamilyMap[this.font] || this.font) : this.fo...

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

2. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 99%]

...次都给我翻倍的增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); butto...

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

3. 【LIST无法拖动】参照官方实例做的 [ 99%]

...selectEnable = true;         list.selectHandler = new Handler(thisthis.onSelect);         list.renderHandler = new Handler(thisthis.updateItem);                  // 设置数据项为对应图片的路径         var data: Array<String>...

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

4. 性能测试-卡通人物2 [ 99%]

...e(); Laya.stage.loadImage("res/cartoon2/background.jpg", 0, 0, 1280, 900); this.createCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff0000" Laya.stage.addChild(text); Laya.timer.frameLoop(1, this, this.gameLoop); } createCharacters() { let char; let charSki...

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

5. 缓动-缓动函数演示 [ 99%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createCharacter(); this.createEaseFunctionList(); this.createDurationCrontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.addChild(character); ch...

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

6. 计时器-间隔循环 [ 99%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频...

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

7. 加载.lh文件 运行后黑屏 无法显示 [ 98%]

...ctor3 = new Laya.Vector3(0, 1, 0);     constructor() {         this._upVector3 = new Laya.Vector3(0, 1, 0);         Laya3D.init(0, 0); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;         Laya.Stat.show();     //var res...

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

8. 性能测试-卡通人物2 [ 98%]

...Animation; // Class Character function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.i...

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

9. 缓动-缓动函数演示 [ 98%]

... function ListItemRender() { var label = null; ListItemRender.__super.call(this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel = function(value) { label.text = value; } } Laya.class(ListItemRender, "ListItemRender", Box); ...

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

10. 基础文本 · LayaAir3.3 · 引擎文档 · LAYABOX [ 98%]

... 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