Commit 07f4a6aa authored by Chen Jiping's avatar Chen Jiping

fix:调整显示位置

parent c67f9a34
...@@ -772,7 +772,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -772,7 +772,6 @@ export class PlayComponent implements OnInit, OnDestroy {
this.cardArr = []; this.cardArr = [];
this.holePosArr = []; this.holePosArr = [];
const edge = 30 * this.mapScale;
const rightNum = Math.ceil(Math.random() * 3); const rightNum = Math.ceil(Math.random() * 3);
const idArr = randomSortByArr([1, 2, 3]); const idArr = randomSortByArr([1, 2, 3]);
...@@ -780,8 +779,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -780,8 +779,8 @@ export class PlayComponent implements OnInit, OnDestroy {
let card = new Card(); let card = new Card();
card.init(this.images, this.mapScale); card.init(this.images, this.mapScale);
card.bg.x = 450 * this.mapScale; card.bg.x = 380 * this.mapScale;
card.bg.y = this.canvasHeight - 40 * this.mapScale; card.bg.y = this.canvasHeight - 80 * this.mapScale;
card.bg['renderZ'] = 8; card.bg['renderZ'] = 8;
card['id'] = 0; card['id'] = 0;
this.renderArr.push(card.bg); this.renderArr.push(card.bg);
...@@ -791,8 +790,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -791,8 +790,8 @@ export class PlayComponent implements OnInit, OnDestroy {
card = new Card(); card = new Card();
card.init(this.images, this.mapScale); card.init(this.images, this.mapScale);
card.bg.x = 850 * this.mapScale; card.bg.x = 820 * this.mapScale;
card.bg.y = this.canvasHeight - 50 * this.mapScale; card.bg.y = this.canvasHeight - 60 * this.mapScale;
card.bg['renderZ'] = 9; card.bg['renderZ'] = 9;
card['id'] = 1; card['id'] = 1;
this.renderArr.push(card.bg); this.renderArr.push(card.bg);
...@@ -802,8 +801,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -802,8 +801,8 @@ export class PlayComponent implements OnInit, OnDestroy {
card = new Card(); card = new Card();
card.init(this.images, this.mapScale); card.init(this.images, this.mapScale);
card.bg.x = 160 * this.mapScale; card.bg.x = 100 * this.mapScale;
card.bg.y = this.canvasHeight + 110 * this.mapScale; card.bg.y = this.canvasHeight + 60 * this.mapScale;
card.bg['renderZ'] = 19; card.bg['renderZ'] = 19;
card['id'] = 1; card['id'] = 1;
this.renderArr.push(card.bg); this.renderArr.push(card.bg);
...@@ -812,7 +811,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -812,7 +811,7 @@ export class PlayComponent implements OnInit, OnDestroy {
card = new Card(); card = new Card();
card.init(this.images, this.mapScale); card.init(this.images, this.mapScale);
card.bg.x = 540 * this.mapScale; card.bg.x = 570 * this.mapScale;
card.bg.y = this.canvasHeight + 110 * this.mapScale; card.bg.y = this.canvasHeight + 110 * this.mapScale;
card.bg['renderZ'] = 19; card.bg['renderZ'] = 19;
card['id'] = 1; card['id'] = 1;
...@@ -822,8 +821,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -822,8 +821,8 @@ export class PlayComponent implements OnInit, OnDestroy {
card = new Card(); card = new Card();
card.init(this.images, this.mapScale); card.init(this.images, this.mapScale);
card.bg.x = 760 * this.mapScale; card.bg.x = 1050 * this.mapScale;
card.bg.y = this.canvasHeight + 110 * this.mapScale; card.bg.y = this.canvasHeight;
card.bg['renderZ'] = 19; card.bg['renderZ'] = 19;
card['id'] = 1; card['id'] = 1;
this.renderArr.push(card.bg); this.renderArr.push(card.bg);
...@@ -949,7 +948,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -949,7 +948,7 @@ export class PlayComponent implements OnInit, OnDestroy {
card.holeId = holeIndex; card.holeId = holeIndex;
card.id = cardIndex; card.id = cardIndex;
card.baseY = pos.y; card.baseY = pos.y;
card.targetY = pos.y - card.bg.height - 20 * this.mapScale; card.targetY = pos.y - card.bg.height - 30 * this.mapScale;
card.bg.renderZ = pos.z; card.bg.renderZ = pos.z;
this.sortRenderZ(this.renderArr); this.sortRenderZ(this.renderArr);
......
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