Commit f97d21f1 authored by ZhangZeyu's avatar ZhangZeyu

feat: new

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