大约有 914 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0069 秒)
Laya_社区(546) Laya2.0_示例(94) Laya_示例(90) Laya2.0_文档(79) Laya3.0_api(62) Laya3.0_文档(41) laya_api(1) Laya2.0_api(1)
...AStart网格 */ private createGridFromAStarMap(texture): any { var textureWidth = texture.width; var textureHeight = texture.height; var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; for (var w = 0; w < textureWidth; w++) { var colaStarArr = aStarArr[w] = []; for (var h = 0;...
来源: Laya3.0_文档 发布时间: 20230303
... middle var midX = this._list.scrollPane.posX + this._list.viewWidth / 2; var cnt = this._list.numChildren; for (var i = 0; i < cnt; i++) { var obj = this._list.getChildAt(i); var dist = Math.abs(midX - obj.x - obj.width / 2)...
来源: Laya_社区 发布时间: 20180719
...er.pixelRatio, Laya.Browser.pixelRatio); changeActionButton.pos(Laya.stage.width / 2 - changeActionButton.width * Laya.Browser.pixelRatio / 2, Laya.stage.height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { //根据名称播放动画 zombieAnimator.pla...
来源: Laya_示例 发布时间: 20260303
...的速度和移动比背景快一点 this.x -= 5 * 1.2; if((this.x + this.width) < 0){ //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor Laya.timer.clear(this, this.onLoop); this.visible = false; this.removeSelf(); } } })(); 地板有了 我们打开MapFloor.js 来...
来源: Laya_社区 发布时间: 20160728
...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(AniConfPath, Handler.crea...
来源: Laya_示例 发布时间: 20260303
...ics.drawTexture(texture); //设置纹理宽高 this.img.size(texture.width, texture.height); <!-- 我想把加粗部分换成 this.img.graphics.drawTexture(Laya.loader.getRes(imgUrl),100,50,60,60); 为什么就不起作用了,switchImg()只执行了一次,不能实现切换图片 ...
来源: Laya_社区 发布时间: 20180226
... tmapsp.zOrder=1; this.tMap.changeViewPort(-((Laya.stage.width-this.tMap.width)/2),-((Laya.stage.height-this.tMap.height)/2),this.tMap.width,this.tMap.height); this.addChild(this.tMap.mapSprite()); 请问这是什么意思啊 2020-04-20 添加评论 免费帖 --> 分...
来源: Laya_社区 发布时间: 20200420
...t = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load(partPath...
来源: Laya2.0_示例 发布时间: 20260303
...设置内容的宽度、高度(以像素为单位)。 * @param width 宽度。 * @param height 高度。 */ private setContentSize(width: number, height: number): void { var content: Box = this._content; var rectX = 0; var rectY =...
来源: Laya_社区 发布时间: 20211108
...is.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOption); Matter.World.add(GameMain.instance...
来源: Laya_社区 发布时间: 20180530