Commit 7bdb453a authored by 王勇霞's avatar 王勇霞

移除改成重绘

parent b83274f9
......@@ -826,5 +826,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1669194028/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1669274894/resource/"
}
\ No newline at end of file
......@@ -322,9 +322,19 @@ export class Game extends Scene {
});
}
editConfigImg(e) {
Tools.gameData.uiConfig = e.data.config;
this.removeAllChildren();
this.initUi();
this.uiConfig = e.data.config;
this.upDateUI();
}
upDateUI() {
this.mainBg.texture = FYGE.Texture.fromUrl(this.uiConfig.mainBg);
this.backBtn.texture = FYGE.Texture.fromUrl(this.uiConfig.serviceBtn);
this.ruleBtn.texture = FYGE.Texture.fromUrl(this.uiConfig.ruleBtn);
this.startBtn.texture = FYGE.Texture.fromUrl(this.uiConfig.mainBtn);
this.textureList.map((item, i) => {
item.img.texture = FYGE.Texture.fromUrl(
this.uiConfig["cardBg" + (i + 1)]
)
});
}
initEvents() {
super.initEvents();
......@@ -356,10 +366,11 @@ class Chip extends FYGE.Sprite {
public ct: FYGE.Container;
private chip: FYGE.Sprite;
public correctNum: number;
img;
init(res, correctNum) {
this.correctNum = correctNum;
this.ct = UI.Ctn(this, 0, 0);
UI.Sp(this.ct, res, 0, 0);
this.img = UI.Sp(this.ct, res, 0, 0);
}
}
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