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

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

1. UI-Button [ 100%]

...UTTON_WIDTH) / 2; yOffset = (Laya.stage.height - VERTICAL_SPACING * (skins.length / COLUMNS - 1) - BUTTON_HEIGHT) / 2; Laya.loader.load(skins, Handler.create(this, this.onUIAssetsLoaded)); } onUIAssetsLoaded() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换...

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

2. 性能测试-骨骼 [ 93%]

...0; i = tAnimNum) { mActionIndex = 0; } for (let i = 0, n = mAnimationArray.length; i = []; private mFactory: Templet; constructor() { this.mSpacingX = Browser.width / this.colCount; this.mSpacingY = Browser.height / this.rowCount; Laya.init(Browser.width, Browser.height, WebGL); Stat.show(); this.mT...

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

3. UI-Input [ 92%]

...s, this.onLoadComplete)); } onLoadComplete() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Lay...

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

4. 网络和格式-ProtocolBuffer [ 91%]

...code(buffer); // ... do something with message // If your application uses length-delimited buffers, there is also encodeDelimited and decodeDelimited. } })();module laya { import Loader = Laya.Loader; import Browser = Laya.Browser; import Handler = Laya.Handler; export class Network_ProtocolBuffer ...

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

5. UI-RadioGroup [ 84%]

...} private initRadioGroups(): void { for (var i: number = 0; i < this.skins.length; ++i) { var rg: RadioGroup = this.createRadioGroup(this.skins[i]); rg.selectedIndex = i; rg.x = i * this.SPACING + this.X_OFFSET; rg.y = this.Y_OFFSET; } } private createRadioGroup(skin: string): RadioGroup { var rg: R...

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

6. Sprite-屏幕截图 [ 71%]

... return btn; } private onLoaded(){ for (let index = 0; index < this.btnArr.length; index++) { this.createButton(this.btnArr[index],this.nameArr[index],this._onclick,index); } this._canvas = window.document.getElementById("layaCanvas") as HTMLCanvasElement; this.aimSp = new Sprite(); this.aimSp.size(...

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

7. UI-RefreshList [ 56%]

...var line = 0; //所有的红点数据索引都增加 if (this.redHotStatus.length > 0) { for (let i = 0; i { //更新list数据源 this.refreshList.array = _arr; this.refreshList.scrollTo(line); //将选中索引设定为该索引 this.refreshList.selectedIndex = index; //恢复滚动条到原位 th...

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