Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
unit_demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
unit_demo
Commits
d76f8c77
Commit
d76f8c77
authored
Mar 30, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改撒花色号
parent
ee5d68a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
demo_03_fireworks_2.fire
play/assets/tmpGame/scene/demo_03_fireworks_2.fire
+17
-17
demo_03_fireworks_2.js
play/assets/tmpGame/scene/demo_03_fireworks_2.js
+3
-3
No files found.
play/assets/tmpGame/scene/demo_03_fireworks_2.fire
View file @
d76f8c77
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
"array": [
"array": [
0,
0,
0,
0,
700.6145516616109
,
695.4104794776155
,
0,
0,
0,
0,
0,
0,
...
@@ -253,7 +253,7 @@
...
@@ -253,7 +253,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 6
"__id__": 6
...
@@ -1169,9 +1169,9 @@
...
@@ -1169,9 +1169,9 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 2
40
,
"r": 2
55
,
"g":
99
,
"g":
226
,
"b":
69
,
"b":
0
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
@@ -1413,9 +1413,9 @@
...
@@ -1413,9 +1413,9 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r":
239
,
"r":
74
,
"g": 2
12
,
"g": 2
05
,
"b":
17
,
"b":
225
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
@@ -1657,9 +1657,9 @@
...
@@ -1657,9 +1657,9 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r":
168
,
"r":
233
,
"g":
25
,
"g":
143
,
"b":
41
,
"b":
253
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
@@ -1901,9 +1901,9 @@
...
@@ -1901,9 +1901,9 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 2
6
,
"r": 2
53
,
"g": 1
60
,
"g": 1
82
,
"b":
209
,
"b":
82
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
@@ -2145,9 +2145,9 @@
...
@@ -2145,9 +2145,9 @@
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r":
170
,
"r":
254
,
"g":
94
,
"g":
83
,
"b": 1
97
,
"b": 1
08
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
...
play/assets/tmpGame/scene/demo_03_fireworks_2.js
View file @
d76f8c77
...
@@ -31,7 +31,7 @@ cc.Class({
...
@@ -31,7 +31,7 @@ cc.Class({
async
showOneFirework
(
pos
,
parentNode
,
nodeList
)
{
async
showOneFirework
(
pos
,
parentNode
,
nodeList
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
this
.
showFirework
(
pos
,
parentNode
,
nodeList
);
this
.
showFirework
(
pos
,
parentNode
,
nodeList
,
200
,
200
,
15
);
await
asyncDelay
(
0.1
);
await
asyncDelay
(
0.1
);
}
}
},
},
...
@@ -43,8 +43,8 @@ cc.Class({
...
@@ -43,8 +43,8 @@ cc.Class({
}
}
},
},
showFirework
(
pos
,
parentNode
,
nodeList
,
width
=
200
,
height
=
200
)
{
showFirework
(
pos
,
parentNode
,
nodeList
,
width
=
200
,
height
=
200
,
number
=
30
)
{
for
(
let
i
=
0
;
i
<
30
;
i
++
)
{
for
(
let
i
=
0
;
i
<
number
;
i
++
)
{
const
quad
=
this
.
createQuads
(
pos
,
parentNode
,
nodeList
);
const
quad
=
this
.
createQuads
(
pos
,
parentNode
,
nodeList
);
const
targetX
=
RandomInt
(
width
/
2
,
-
width
/
2
);
const
targetX
=
RandomInt
(
width
/
2
,
-
width
/
2
);
const
targetY
=
RandomInt
(
height
);
const
targetY
=
RandomInt
(
height
);
...
...
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