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

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

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

...gments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosition:Point; constructor() { Laya.init(Browser.width, Browser.height, WebGL); // 初始化蛇 this.initSnake(); // 监视加速器状态 Accelerator.in...

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

2. UI-Button [ 93%]

... this.onUIAssetsLoaded)); } private onUIAssetsLoaded(): void { for (var i: number = 0, len = this.skins.length; i < len; ++i) { var btn: Button = this.createButton(this.skins[i]); var x: number = i % this.COLUMNS * this.HORIZONTAL_SPACING + this.xOffset; var y: number = (i / this.COLUMNS | 0) * this...

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

3. 性能测试-虫子(慎入) [ 90%]

...{ private texturePath:string = "../../res/tinyMaggot.png"; private padding:number = 100; private maggotAmount:number = 5000; private tick:number = 0; private maggots:Array = []; private wrapBounds:Rectangle; private maggotTexture:any; constructor() { Laya.init(Browser.width,Browser.height, WebGL); L...

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

4. 鼠标交互-滑动 [ 88%]

... export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; private endPosition: number; private button: Sprite; constructor() ...

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

5. 骨骼动画-多纹理 [ 88%]

...ebGL; export class MultiTexture { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; constructor() { WebGL.enable...

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

6. 骨骼动画-藤蔓 [ 88%]

...export class Skeleton_SpineVine { private mAniPath:string; private mStartX:number = 200; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; c...

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

7. 骨骼动画-橡胶人 [ 87%]

...class Skeleton_SpineStretchyman { private mAniPath:string; private mStartX:number = 200; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mFactory2:Templet; c...

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

8. UI-List [ 87%]

...对应图片的路径 var data = []; for (var i = 0; i = []; for (var i: number = 0; i < 10; ++i) { data.push("../../res/ui/listskins/1.jpg"); data.push("../../res/ui/listskins/2.jpg"); data.push("../../res/ui/listskins/3.jpg"); data.push("../../res/ui/listskins/4.jpg"); data.push("../../res/ui/list...

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

9. 骨骼动画-换装 [ 86%]

....WebGL; export class ChangeSkin { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; private mSkinList:any = ["go...

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

10. UI-Dialog [ 86%]

... import WebGL = Laya.WebGL; export class UI_Dialog { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: Array; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 6...

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