大约有 383 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0037 秒)
Laya_社区(166) Laya3.0_api(70) Laya2.0_api(62) laya_api(59) Laya_示例(9) Laya2.0_文档(8) Laya2.0_示例(7) Laya3.0_文档(2)
一个动画我想设置它的大小该怎么取设置啊 rec = new Laya.Rectangle(0,0,100,100) ani.setBounds(rec) var bounds = ani.getGraphicBounds(); ani.scale(100/bounds.width,100/bounds.height) 我想把动画宽高都设置成100 100 可是这2种方法都不能实现 该怎么去...
来源: Laya_社区 发布时间: 20170629
... this.map = new Laya.TiledMap(); this.map.createMap(this.MAP_URL, new Laya.Rectangle(0,0,Laya.stage.width, Laya.stage.height), new Laya.Handler(this, this.onMap)) } private onMap(){ var idx = this.map.getLayerByIndex(0).getTileDataByScreenPos(20,20); var pass = this.map.getTileProperties(0,idx - 1...
来源: Laya_社区 发布时间: 20190218
...答 Laya.Physics.I.worldRoot = this.road; this.road.scrollRect = new Laya.Rectangle(0, 100, this.width, this.height); 2020-10-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 layabox 赞同来自: 物理辅助线...
来源: Laya_社区 发布时间: 20201011
...prite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = this.target.x - 400; this.cameraRect.y = this.target.y - 400; } 2020-08-13 0 0 分享 微博 QZONE 微信 为什么被...
来源: Laya_社区 发布时间: 20190214
... = new Laya.TiledMap(); this.tiledMap.createMap("desert.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this,this.loadedMap)); } loadedMap(){ this.sp=new Laya.Sprite(); this.sp.graphics.drawRect(0,0,100,100,"#FF0000"); var mapLayer = this.t...
来源: Laya_社区 发布时间: 20171125
...来自: 可以了 this.tiledMap.createMap("res/tiled/green.json", new Rectangle(0, 0, 1120, 860), new Handler(this, this.completeHandler),null,new Point(1120,860)); 最后那个参数new Point(1120,860),其实是地图的分块渲染的大小,默认是450,450,所以把我的地图分成3次...
来源: Laya_社区 发布时间: 20180321
...h = this.width; this.mask.height = this.height; this.mask.scrollRect = new Rectangle(); this.mask.scrollRect.setTo(0, 0, this.width, this.height); this.mask.optimizeScrollRect = true; this.addChild(this.mask); } this.initContent = function () { this.content = new Box(); this.content.width = this.wid...
来源: Laya_社区 发布时间: 20161118
...哪有计算 对象真是的大小了,明明 内部被赋值过一个 Rectangle 后就一直没变过 附件 : --> 2017-11-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 5 个回复 ymsdandan 赞同来自: 因为你...
来源: Laya_社区 发布时间: 20171109
...ureCmd 用texture填充。 Graphics getBounds(realSize:Boolean = false):Rectangle 获取位置及宽高信息矩阵(比较耗CPU,频繁使用会造成卡顿,尽量少用)。 Graphics loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Function = ...
来源: Laya2.0_api 发布时间: 20190513
... _OnMapCreate() { console.log("map create ..."); } var viewRect = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height); var tMap = new Laya.TiledMap(); tMap.createMap("res/isometric_grass_and_water.json", viewRect, Laya.Handler.create(this, this._OnMapCreate), null, new Laya.Point(2 * 64, 2...
来源: Laya_社区 发布时间: 20190102