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

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

1. 动画不显示 [ 100%]

...           private var m_bkSound:Sound;         private var m_mapLayer:Sprite;         private var m_MapImgUrl:String;         private var m_Role:Animation;         private var m_RolePosition:Point = new Point(1200,1000);         private var m_MovStartPos:Point =...

来源: Laya_社区 发布时间: 20170921

2. 在 tiledmap 插入一个精灵在上面 [ 96%]

...Laya.Sprite();   this.sp.graphics.drawRect(0,0,100,100,"#FF0000");   var mapLayer = this.tiledMap.getLayerByIndex(1);   console.info(mapLayer.layerName);   this.sp.pos(0,0);   mapLayer._childs[0].addChild(this.sp); }   }   new GameInfo();   遇到问题1 把精灵插入地图时 如果代...

来源: Laya_社区 发布时间: 20171125

3. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 91%]

...该是BG段长度,难道不是么?并且细心同学会发现在maplayer计算坐标位置都会用这个width/2方式计算格子和屏幕坐标如方法 /**          * 通过地图坐标得到屏幕坐标          * @param    tileX 格子坐标X          * @param...

来源: Laya_社区 发布时间: 20161109

4. 加载TiledMap 不显示 [ 85%]

...示 import Sprite = Laya.Sprite; import Stage = Laya.Stage; import MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; import Rectangle = Laya.Rectangle; import Handler = Laya.Handler; import WebGL = Laya.WebGL;  export class TiledMap_Isom...

来源: Laya_社区 发布时间: 20201230

5. 向TiledMap中对象层中矩形框添加精灵,不显示 [ 80%]

...dMap)); } private var sp:Sprite; private function onLoadedMap():void { var mapLayer:MapLayer=tiledMap.getLayerByIndex(2); sp=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); sp.zOrder=1000; mapLayer.addChild(sp); Laya.timer.loop(200,this,onLoop); } private var aaa:Number=0; priva...

来源: Laya_社区 发布时间: 20170525

6. 设置viewport后显示区域变黑色 [ 75%]

设置viewport后显示区域变黑色 在TileMapMapLayerinit函数中   如果设置viewport,显示区域变黑 如果设置scrollRect,正常显示                //          this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height);             th...

来源: Laya_社区 发布时间: 20170418

7. tiledmap 可以在图块层指定格子上添加Sprite吗 [ 71%]

...//, null, new Laya.Point(1600, 816)); } private test(){ var testLayer:Laya.MapLayer = this.tMap.getLayerByName("player"); this.tMapPlayer = new Laya.Sprite(); this.tMapPlayer.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1); //this.tMapPlayer.loadImage("unit/test.png"); this.tMapPlayer.zOr...

来源: Laya_社区 发布时间: 20170627

8. TiledMap加载报错 relativePath为空 [ 65%]

... Laya.Rectangle; var Handler = Laya.Handler; var Sprite = Laya.Sprite; var MapLayer = Laya.MapLayer; Laya.init(800, 800); var map1 = new TiledMap(); map1.createMap("res/maps/scence1.json",new Rectangle(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载...

来源: Laya_社区 发布时间: 20180326

9. 引擎 TiledMap 居然不支持图块翻转 [ 48%]

...             this._aniName = null;         }     }     class MapLayer extends Laya.Sprite {         constructor() {             super(...arguments);             this._mapData = null;             this._tileWidthHalf = 0;             this._tileHeightHalf = 0; ...

来源: Laya_社区 发布时间: 20220627