Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GameDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
张泽禹
GameDemo
Commits
f97d21f1
Commit
f97d21f1
authored
Nov 15, 2021
by
ZhangZeyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: new
parent
02560d4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
Flop.ts
src/game/Flop.ts
+3
-10
No files found.
src/game/Flop.ts
View file @
f97d21f1
...
@@ -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
();
start
Game
();
render
Game
();
},
},
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
;
});
});
};
};
start
Game
();
render
Game
();
}
}
update
()
{
update
()
{
super
.
update
();
super
.
update
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment