Commit 89460a0f authored by 范雪寒's avatar 范雪寒

fix: 标题顶部居中

parent 78466f6a
...@@ -1173,9 +1173,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1173,9 +1173,9 @@ export class PlayComponent implements OnInit, OnDestroy {
const title = new MySprite(); const title = new MySprite();
title.init(this.images.get('title')); title.init(this.images.get('title'));
title.setScaleXY(this.mapScale); title.setScaleXY(this.mapScale);
// title.x = this.canvasWidth / 2; title.x = this.canvasWidth / 2;
// title.y = this.canvasHeight / 2 - 270 * this.mapScale; // title.y = this.canvasHeight / 2 - 270 * this.mapScale;
title.x = this.mapScale * (30 + title.width / 2); // title.x = this.mapScale * (30 + title.width / 2);
title.y = this.mapScale * (30 + title.height / 2); title.y = this.mapScale * (30 + title.height / 2);
this.bgArr.push(title); this.bgArr.push(title);
......
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