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

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

1. 输入设备-地图 [ 100%]

...s.createDom(); this.initMap(); this.createInfoText(); let successHandler = new Handler(this, this.updatePosition); let errorHandler = new Handler(this, this.onError); // 使用高精度位置 Geolocation.enableHighAccuracy = true; Geolocation.watchPosition(successHandler, errorHandler); // 绑定作...

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

2. 加载-错误处理和进度 [ 74%]

...: " + progress); } onError(err) { console.log("加载失败: " + err); } } new Loader_ProgressAndErrorHandle();module laya { import Event = Laya.Event; import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_ProgressAndErrorHandle { constructor(...

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

3. 区块地图-等角地图 [ 66%]

....TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } onStag...

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

4. 区块地图-PerspectiveWall [ 62%]

...onst TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/perspective_walls.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } } new TiledMap_PerspectiveWall();module laya { import Stage = Laya.Stage; impor...

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

5. 区块地图-带动画的地图 [ 61%]

...reateMap(); } createMap() { const TiledMap = Laya.TiledMap; let tiledMap = new TiledMap(); tiledMap.createMap("res/tiledMap/orthogonal-test-movelayer.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } } new TiledMap_AnimationTile();module laya { import Stage = Laya.Stage;...

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

6. 区块地图-滚动地图 [ 50%]

...Browser = Laya.Browser; mX = mY = 0; // 创建地图对象 this.tiledMap = new TiledMap(); // 创建地图,适当的时候调用destory销毁地图 this.tiledMap.createMap("res/tiledMap/desert.json", new Rectangle(0, 0, Browser.width, Browser.height), new Handler(this, this.completeHandler)); } //...

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