Commit 26ff65cb authored by wjf's avatar wjf

l

parent b8eeec7b
......@@ -13,15 +13,15 @@ export class Tool {
/**
* 格子宽度
*/
public static width = 80;
public static width = 81.5;
/**
* 格子高度
*/
public static height = 80;
public static height = 81.5;
//整体偏移X
public static offsetX = 15;
public static offsetX = 8.25;
//整体偏移Y
public static offsetY = 275;
public static offsetY = 260;
/**
* 圆角半径
*/
......@@ -52,7 +52,7 @@ export class Tool {
* 初始化数据
*/
public static init(isTwo: boolean = false) {
this.offsetX = isTwo ? 55 : 15
this.offsetX = isTwo ? 49 : 8.25
//都是9*9
//位置信息
var spaceX = this.width,
......
......@@ -14,13 +14,15 @@ export function drawBg(paths: PathData[], lattices?: number[]) {
for (var m = 0; m < lattices.length; m++) {
if (lattices[m]) {
var rc = Tool.indexToRc(m);
if ((!(rc[0] % 2) && !(rc[1] % 2)) || (rc[0] % 2 && rc[1] % 2)) {
let p = Tool.getPositionByIndex(m);
let img = new eui.Image(texture);
img.x = p[0] - texture.textureWidth / 2;
img.y = p[1] - texture.textureHeight / 2;
bg.addChild(img)
}
// if ((!(rc[0] % 2) && !(rc[1] % 2)) || (rc[0] % 2 && rc[1] % 2)) {
let p = Tool.getPositionByIndex(m);
let img = new eui.Image(texture);
img.x = p[0] - texture.textureWidth / 2;
img.y = p[1] - texture.textureHeight / 2;
img.width = 78;
img.height = 78;
bg.addChild(img)
// }
}
}
bg.cacheAsBitmap = true;
......
import PropType from "../../PropType";
import { Tool } from "../Tool";
/**
* 道具使用引导,初始化一次,然后用init初始化
......@@ -86,11 +87,11 @@ export class PropGuide extends egret.DisplayObjectContainer {
this.bg.graphics.lineTo(750, 1624);
this.bg.graphics.lineTo(0, 1624);
this.bg.graphics.lineTo(0, 0);
this.bg.graphics.moveTo(15, 275);
this.bg.graphics.lineTo(15, 990);
this.bg.graphics.lineTo(750 - 15, 990);
this.bg.graphics.lineTo(750 - 15, 275);
this.bg.graphics.lineTo(15, 275);
this.bg.graphics.moveTo(Tool.offsetX, Tool.offsetY);
this.bg.graphics.lineTo(Tool.offsetX, Tool.offsetY + Tool.height * Tool.rowNum);
this.bg.graphics.lineTo(750 - Tool.offsetX, Tool.offsetY + Tool.height * Tool.rowNum);
this.bg.graphics.lineTo(750 - Tool.offsetX, Tool.offsetY);
this.bg.graphics.lineTo(Tool.offsetX, Tool.offsetY);
this.bg.graphics.endFill();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment