Commit 0353d413 authored by Chen Jiping's avatar Chen Jiping

fix:修复颜色错误

parent 3538952c
...@@ -55,6 +55,17 @@ export class Letter{ ...@@ -55,6 +55,17 @@ export class Letter{
} }
setColor(bgColor = "#dbd0e7", lineColor = "#8d4fad"){
this.bgColor = bgColor;
this.lineColor = lineColor;
if(this.bg){
this.bg.fillColor = bgColor;
this.bg.strokeColor = lineColor;
}
}
initView(){ initView(){
const letter = new Label(); const letter = new Label();
letter.text = this.data.val; letter.text = this.data.val;
......
...@@ -781,6 +781,17 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -781,6 +781,17 @@ export class PlayComponent implements OnInit, OnDestroy {
let answerSpr = tempAnswerSprArr[i]; let answerSpr = tempAnswerSprArr[i];
let bgColor = "#dbd0e7";
let lineColor = "#8d4fad";
if (i % 2 == 0) {
bgColor = "#ffdd00";
lineColor = "#cd9000";
}
answerSpr.setColor(bgColor, lineColor);
let dW = (45 + Math.ceil(Math.random() * 60)) * this.mapScale; let dW = (45 + Math.ceil(Math.random() * 60)) * this.mapScale;
answerSpr.dW = dW; answerSpr.dW = dW;
......
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