Commit f97d21f1 authored by ZhangZeyu's avatar ZhangZeyu

feat: new

parent 02560d4a
...@@ -15,10 +15,6 @@ export class Flop extends Scene { ...@@ -15,10 +15,6 @@ export class Flop extends Scene {
// 开始游戏按钮 // 开始游戏按钮
let countDown = new FYGE.TextField(); let countDown = new FYGE.TextField();
countDown.fillColor = "#ff0000"; countDown.fillColor = "#ff0000";
// setInterval(()=>{
// countDown.text = `倒计时${showtime()}`;
// })
countDown.size = 50; countDown.size = 50;
countDown.x = 0; countDown.x = 0;
countDown.y = 1500; countDown.y = 1500;
...@@ -68,7 +64,7 @@ export class Flop extends Scene { ...@@ -68,7 +64,7 @@ export class Flop extends Scene {
() => { () => {
bigContainer.removeAllChildren(); bigContainer.removeAllChildren();
gamedata.shuffle(); gamedata.shuffle();
startGame(); renderGame();
}, },
this this
); );
...@@ -181,8 +177,7 @@ export class Flop extends Scene { ...@@ -181,8 +177,7 @@ export class Flop extends Scene {
}; };
//生成游戏 //生成游戏
const startGame = () => { const renderGame = () => {
console.log("gamedata", gamedata);
gamedata.map((data, index) => { gamedata.map((data, index) => {
const picItem = bigContainer.addChild(getPicDisplayById(data)); const picItem = bigContainer.addChild(getPicDisplayById(data));
const col = index % GAME_SIZE; const col = index % GAME_SIZE;
...@@ -202,11 +197,9 @@ export class Flop extends Scene { ...@@ -202,11 +197,9 @@ export class Flop extends Scene {
return picItem; return picItem;
}); });
}; };
startGame(); renderGame();
} }
update() { update() {
super.update(); super.update();
} }
} }
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