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
5d310c95
Commit
5d310c95
authored
Dec 07, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
171b8b8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
createItems.ts
egret/src/startScene/createItems.ts
+3
-3
No files found.
egret/src/startScene/createItems.ts
View file @
5d310c95
...
@@ -4,7 +4,7 @@ import { award, awardMask } from "./collisionConfig";
...
@@ -4,7 +4,7 @@ import { award, awardMask } from "./collisionConfig";
import
random
from
"./random"
;
import
random
from
"./random"
;
import
LabelType
from
"./items/LabelType"
;
import
LabelType
from
"./items/LabelType"
;
export
const
createNewBubble
=
(
_this
:
StartScene
,
type
:
LabelType
)
=>
{
export
const
createNewBubble
=
(
_this
:
StartScene
,
type
:
LabelType
)
=>
{
createBubble
(
_this
,
type
,
Math
.
random
()
>
0.5
?
180
:
750
-
180
,
220
);
createBubble
(
_this
,
type
,
Math
.
random
()
>
0.5
?
180
:
750
-
180
,
220
);
}
}
...
@@ -32,8 +32,8 @@ export default (_this: StartScene) => {
...
@@ -32,8 +32,8 @@ export default (_this: StartScene) => {
let
count
=
0
;
let
count
=
0
;
const
coinsFall
=
setInterval
(()
=>
{
const
coinsFall
=
setInterval
(()
=>
{
if
(
count
<
14
)
{
if
(
count
<
14
)
{
const
types
=
[
LabelType
.
candy
,
LabelType
.
coin
,
LabelType
.
gift
,
LabelType
.
egg
]
//
const types = [ LabelType.candy, LabelType.coin, LabelType.gift,LabelType.egg]
// const types = [LabelType.boom, LabelType.candy, LabelType.coin, LabelType.gift,
LabelType.egg]
const
types
=
[
LabelType
.
boom
,
LabelType
.
candy
,
LabelType
.
coin
,
LabelType
.
gift
,
LabelType
.
egg
]
const
i
=
Math
.
floor
(
Math
.
random
()
*
types
.
length
);
const
i
=
Math
.
floor
(
Math
.
random
()
*
types
.
length
);
const
type
=
types
[
i
];
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
)
...
...
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