Commit 81058fdf authored by limingzhe's avatar limingzhe

feat: 适配窗口

parent 03c59257
...@@ -431,20 +431,28 @@ cc.Class({ ...@@ -431,20 +431,28 @@ cc.Class({
const letterS = this.data.letter.toLowerCase(); const letterS = this.data.letter.toLowerCase();
const itemLetterBig = getSprNode('letter/' + letterS + '_1_1'); const itemLetterBig = getSprNode('letter/' + letterS + '_1_1');
itemLetterBig.x = -this.canvas.width / 2 + 70 * this._mapScaleMin; // itemLetterBig.x = -this.canvas.width / 2 + 70 * this._mapScaleMin;
itemLetterBig.y = 200 * this._mapScaleMin; // itemLetterBig.y = 200 * this._mapScaleMin;
itemLetterBig.scale = this._mapScaleMin; itemLetterBig.scale = this._mapScaleMin;
itemLetterBig.anchorY = 0.28 itemLetterBig.anchorY = 0.28
this.canvas.addChild(itemLetterBig); this.canvas.addChild(itemLetterBig);
const itemBgBig = getSprNode('item_bg'); const itemBgBig = getSprNode('item_bg');
itemBgBig.scale = this._mapScaleMin; itemBgBig.scale = this._mapScaleMin;
itemBgBig.x = itemLetterBig.x + 70 * this._mapScaleMin; // itemBgBig.x = itemLetterBig.x + 70 * this._mapScaleMin;
itemBgBig.y = itemLetterBig.y; // itemBgBig.y = itemLetterBig.y;
itemBgBig.anchorX = 0; itemBgBig.anchorX = 0;
this.canvas.addChild(itemBgBig); this.canvas.addChild(itemBgBig);
this.itemBgBig = itemBgBig; this.itemBgBig = itemBgBig;
const letterW = 50 * this._mapScaleMin;
itemBgBig.x = -itemBgBig.width / 2 * itemBgBig.scaleX + letterW;
itemBgBig.y = 200 * this._mapScaleMin;
itemLetterBig.x = itemBgBig.x - letterW;
itemLetterBig.y = itemBgBig.y;
const letterAnim0 = this.getLetterAnimBig0(letterS); const letterAnim0 = this.getLetterAnimBig0(letterS);
letterAnim0.x = 100; letterAnim0.x = 100;
...@@ -472,20 +480,27 @@ cc.Class({ ...@@ -472,20 +480,27 @@ cc.Class({
const letterS = this.data.letter.toLowerCase(); const letterS = this.data.letter.toLowerCase();
const itemLetterSmall = getSprNode('letter/' + letterS + '_0_1'); const itemLetterSmall = getSprNode('letter/' + letterS + '_0_1');
itemLetterSmall.x = -this.canvas.width / 2 + 70 * this._mapScaleMin; // itemLetterSmall.x = -this.canvas.width / 2 + 70 * this._mapScaleMin;
itemLetterSmall.y = -30 * this._mapScaleMin; // itemLetterSmall.y = -30 * this._mapScaleMin;
itemLetterSmall.scale = this._mapScaleMin; itemLetterSmall.scale = this._mapScaleMin;
this.canvas.addChild(itemLetterSmall); this.canvas.addChild(itemLetterSmall);
const itemBgSmall = getSprNode('item_bg'); const itemBgSmall = getSprNode('item_bg');
itemBgSmall.scale = this._mapScaleMin; itemBgSmall.scale = this._mapScaleMin;
itemBgSmall.x = itemLetterSmall.x + 70 * this._mapScaleMin; // itemBgSmall.x = itemLetterSmall.x + 70 * this._mapScaleMin;
itemBgSmall.y = itemLetterSmall.y; // itemBgSmall.y = itemLetterSmall.y;
itemBgSmall.anchorX = 0; itemBgSmall.anchorX = 0;
this.canvas.addChild(itemBgSmall); this.canvas.addChild(itemBgSmall);
this.itemBgSmall = itemBgSmall; this.itemBgSmall = itemBgSmall;
const letterW = 50 * this._mapScaleMin;
itemBgSmall.x = -itemBgSmall.width / 2 * itemBgSmall.scaleX + letterW;
itemBgSmall.y = -30 * this._mapScaleMin;
itemLetterSmall.x = itemBgSmall.x - letterW;
itemLetterSmall.y = itemBgSmall.y;
const letterAnim0 = this.getLetterAnimSmall0(letterS); const letterAnim0 = this.getLetterAnimSmall0(letterS);
letterAnim0.x = 100; letterAnim0.x = 100;
letterAnim0.y = 0; letterAnim0.y = 0;
......
This diff is collapsed.
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