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

大约有 8 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0020 秒)

1. UI-List [ 100%]

...+ index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: s...

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

2. IDE-显示IDE创建的界面 [ 95%]

...; import Handler = Laya.Handler; import Loader = Laya.Loader; class TestUI extends game.ui.test.TestPageUI { constructor() { super(); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Laya.CLICK, this, this.onBtnClick); this.btn2.on(Laya.CLICK, this, ...

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

3. 输入设备-贪吃蛇(重力感应) [ 79%]

...stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Sprite { constructor(width:number, height:number) { super(); this.size(width, height); this.init(); } private init():void { this.graphics.drawRect(-this.height / 2, -this.height / 2, this.width + this.height, this.hei...

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

4. 缓动-缓动函数演示 [ 77%]

...; input.inputElementYAdjuster = 1; return input } } } class ListItemRender extends Box { private label: Label; constructor() { super(); this.size(100, 20); this.label = new Label(); this.label.fontSize = 12; this.label.color = "#FFFFFF"; this.addChild(this.label); } public setLabel(value: string): v...

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

5. 性能测试-虫子(慎入) [ 74%]

...t.pos(x, y); } tick += 0.1; } } } import laya.display.Sprite; class Maggot extends Sprite { public var direction:Number; public var turningSpeed:Number; public var speed:Number; public var offset:Number; }

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

6. UI-Tree [ 72%]

..."Box", "props": {"name": "render", "right": "0", "left": "0"}}; class Item extends Box { constructor() { super(); this.right = 0; this.left = 0; var selectBox: Clip = new Clip("../../res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox";//设置 selectBox 的name 为“selectBox”时...

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

7. 性能测试-卡通人物2 [ 69%]

... % 60 === 0) { this.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { ...

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

8. 其他引擎的Demo-Example_23 [ 65%]

...rement the ticker tick += 1; } } } import laya.display.Sprite; class Laser extends Sprite { public var life:int; }

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