Commit 4b9e5567 authored by Chen Jiping's avatar Chen Jiping

完善

parent 13ca26c8
......@@ -846,7 +846,7 @@ export class PlayComponent implements OnInit, OnDestroy {
lotusLeaf.init(this.images.get("b_lotus_leaf"));
lotusLeaf.x = this.canvasWidth + lotusLeaf.getBoundingBox().width / 2;
lotusLeaf.y = this.canvasHeight + lotusLeaf.getBoundingBox().height / 2;
this.renderArr.push(lotusLeaf);
this.bigLotusLeaf.lotusLeaf = lotusLeaf;
let initX = this.canvasWidth - lotusLeaf.getBoundingBox().width / 2 - 150 * this.mapScale;
......@@ -856,7 +856,7 @@ export class PlayComponent implements OnInit, OnDestroy {
//水波
const leafWave = new MySprite();
leafWave.setScaleXY(this.mapScale);
leafWave.setScaleXY(this.mapScale * 0.6);
leafWave.init(this.images.get("b_leaf_wave"));
leafWave.x = initX;
leafWave.y = initY;
......@@ -864,6 +864,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderArr.push(leafWave);
this.bigLotusLeaf.leafWave = leafWave;
//影子
const shadow = new MySprite();
shadow.setScaleXY(this.mapScale);
......@@ -873,6 +875,9 @@ export class PlayComponent implements OnInit, OnDestroy {
shadow.visible = false;
this.renderArr.push(shadow);
this.bigLotusLeaf.shadow = shadow;
//添加荷叶到渲染数组
this.renderArr.push(lotusLeaf);
}
......@@ -1097,10 +1102,12 @@ export class PlayComponent implements OnInit, OnDestroy {
content_val.textAlign='middle';
content_val.fontSize = 120;
content_val.fontName = "BRLNSDB";
content_val.fontColor = "#006400";
content_val.fontColor = "#FFFFFF";
content_val.alpha = 0;
content_val.refreshSize();
content_val.setOutline(5, "#006400");
setFontSize(parItem.height - 40 * this.mapScale, content_val);
......@@ -1109,21 +1116,6 @@ export class PlayComponent implements OnInit, OnDestroy {
content_val.x = - content_val.getBoundingBox().width/2;
content_val.y = -20 * this.mapScale;
//字中字效果
{
let content_val_2 = new Label();
content_val_2.text = content.val;
content_val_2.textAlign='middle';
content_val_2.fontSize = content_val.fontSize - 4;
content_val_2.fontName = "BRLNSDB";
content_val_2.fontColor = "#FFFFFF";
content_val_2.alpha = 0;
content_val_2.refreshSize();
content_val_2.x = (content_val.getBoundingBox().width - content_val_2.getBoundingBox().width ) / 2;
//content_val_2.y = (content_val.getBoundingBox().height - content_val_2.getBoundingBox().height ) / 2;
content_val.addChild(content_val_2);
content_val.childDepandAlpha = true;
}
lotusLeafObj.conText = content_val;
......@@ -1678,7 +1670,7 @@ export class PlayComponent implements OnInit, OnDestroy {
tweenChange(this.bigLotusLeaf.leafWave, {scaleX:scale, scaleY:scale, alpha:0}, 3, ()=>{
//回到初始大小
this.bigLotusLeaf.leafWave.setScaleXY(this.mapScale);
this.bigLotusLeaf.leafWave.setScaleXY(this.mapScale * 0.6);
//回到初始透明度
this.bigLotusLeaf.leafWave.alpha = 1;
......
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