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

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

1. 输入设备-指南针 [ 100%]

...ate degreesText:Text; private directionIndicator:Sprite; private firstTime:Boolean = true; constructor() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(this.compassImgPath, Ha...

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

2. Sprite-切换纹理 [ 90%]

...ey2.png"; private texture2: string = "res/apes/monkey3.png"; private flag: boolean = false; private ape: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...

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

3. 其他引擎的Demo-Example_21 [ 87%]

...666", "#F6C84C", "#4C779A"]; private colorCount:number = 0; private isDown:Boolean = false; private path:Array = []; private color:String = this.colors[0]; private liveGraphics:Graphics; private canvasGraphics:Graphics; constructor() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgCo...

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

4. 鼠标交互-Hold [ 82%]

..."; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleM...

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

5. 加载-销毁Texture使用的图片资源 [ 79%]

...niFly:Animation; private btn:Sprite; private txt:Text; private isDestroyed:Boolean = false; private readonly PathBg:string = "res/bg2.png"; private readonly PathFly:string = "res/fighter/fighter.atlas"; constructor() { //初始化引擎 Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); La...

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

6. UI-RefreshList [ 41%]

...按下状态,true为已按下,用于状态判断 */ private mouseDown: boolean = false; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(1334, 750, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWAL...

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