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

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

1. 缓动 · LayaAir3.0文档 · LAYABOX [ 100%]

...props 变化的属性列表,比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。 * @param duration 花费的时间,单位毫秒。 * @param ease 缓动类型,默认为匀速运动。 * @param complete 结束回调函数。 * @para...

来源: Laya3.0_文档 发布时间: 20230726

2. 定时器 · LayaAir3.0文档 · LAYABOX [ 97%]

...null, coverBefore: boolean = true, jumpFrame: boolean = false): void { var handler: TimerHandler = this._create(false, true, delay, caller, method, args, coverBefore); if (handler) handler.jumpFrame = jumpFrame; } 使用示例如下: const { regClass } = Laya; import { RuntimeScriptBase } from "./...

来源: Laya3.0_文档 发布时间: 20230724

3. 事件管理 · LayaAir3.0文档 · LAYABOX [ 91%]

...型 Laya.Event2.2 事件派发 Laya.EventDispatcher2.3 事件处理 Laya.Handler3. 自定义的事件事件管理 1. 认识事件 1.1 什么是事件 事件Event指的是由系统事先设定的、能被对象识别和响应的动作,事件是指对象对于外部动作的响应,当对方发生...

来源: Laya3.0_文档 发布时间: 20230729

4. 获取位置信息 · LayaAir3.0文档 · LAYABOX [ 85%]

...BLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocation.position); }, function (error: an...

来源: Laya3.0_文档 发布时间: 20230725

5. 场景管理 · LayaAir3.0文档 · LAYABOX [ 69%]

...open(url: string, closeOther: boolean = true, param: any = null, complete: Handler = null, progress: Handler = null): Promise<Scene> { Scene.showLoadingPage(); return Scene.load(url, Handler.create(null, this._onSceneLoaded, [closeOther, complete, param]), progress); } (图2-1) 例如创...

来源: Laya3.0_文档 发布时间: 20230717

6. TiledMap地图 · LayaAir3.0文档 · LAYABOX [ 60%]

...is.tMap.createMap("resources/TiledMap/orthogonal.json", viewRect, new Laya.Handler(this, this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHa...

来源: Laya3.0_文档 发布时间: 20230303

7. 2D性能优化 · LayaAir3.0文档 · LAYABOX [ 36%]

...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 直接调用size设置: Laya.loader.load("res...

来源: Laya3.0_文档 发布时间: 20231008

8. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 36%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫下,发现手机已经...

来源: Laya3.0_文档 发布时间: 20230629