Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔立强
db-game-template
Commits
16762efd
Commit
16762efd
authored
Dec 11, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
be9d5e11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
createItems.ts
egret/src/startScene/createItems.ts
+5
-6
No files found.
egret/src/startScene/createItems.ts
View file @
16762efd
...
@@ -33,16 +33,15 @@ export default (_this: StartScene) => {
...
@@ -33,16 +33,15 @@ export default (_this: StartScene) => {
const
items
=
getCurrentItems
();
//[[LabelType.boom, 1], [LabelType.coin, 5]]
const
items
=
getCurrentItems
();
//[[LabelType.boom, 1], [LabelType.coin, 5]]
const
list
=
[];
const
list
=
[];
for
(
const
item
of
items
)
{
for
(
const
item
of
items
)
{
for
(
let
i
=
0
;
i
<
item
[
1
];
i
++
)
{
list
.
push
(
item
[
0
]);
}
}
}
let
count
=
0
;
let
count
=
0
;
const
countMax
=
1
;
const
countMax
=
1
;
const
coinsFall
=
setInterval
(()
=>
{
const
coinsFall
=
setInterval
(()
=>
{
if
(
count
<
14
)
{
if
(
count
<=
list
.
length
-
1
)
{
// const types = [ LabelType.candy, LabelType.coin, LabelType.gift,LabelType.egg]
const
type
=
list
[
count
];
const
types
=
[
LabelType
.
boom
,
LabelType
.
candy
,
LabelType
.
coin
,
LabelType
.
gift
,
LabelType
.
egg
]
const
i
=
Math
.
floor
(
Math
.
random
()
*
types
.
length
);
const
type
=
types
[
i
];
createBubble
(
_this
,
type
,
375
+
Math
.
random
()
*
200
-
100
,
400
+
200
+
100
)
createBubble
(
_this
,
type
,
375
+
Math
.
random
()
*
200
-
100
,
400
+
200
+
100
)
count
++
;
count
++
;
}
else
{
}
else
{
...
...
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