Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WL01
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
WL01
Commits
ddf1ee56
Commit
ddf1ee56
authored
Jul 15, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ 地鼠贴纸移到屏幕右上
parent
85b576e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
105 deletions
+181
-105
WL01.fire
play/assets/WL01/scene/WL01.fire
+161
-92
WL01.js
play/assets/WL01/scene/WL01.js
+20
-13
No files found.
play/assets/WL01/scene/WL01.fire
View file @
ddf1ee56
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__": 11
3
"__id__": 11
5
}
}
],
],
"_active": false,
"_active": false,
...
@@ -117,25 +117,25 @@
...
@@ -117,25 +117,25 @@
"__id__": 93
"__id__": 93
},
},
{
{
"__id__":
99
"__id__":
101
},
},
{
{
"__id__": 10
1
"__id__": 10
3
},
},
{
{
"__id__": 1
08
"__id__": 1
10
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 11
0
"__id__": 11
2
},
},
{
{
"__id__": 11
1
"__id__": 11
3
},
},
{
{
"__id__": 11
2
"__id__": 11
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -869,9 +869,9 @@
...
@@ -869,9 +869,9 @@
"_enabled": true,
"_enabled": true,
"_color": {
"_color": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r":
226
,
"r":
182
,
"g":
141
,
"g":
94
,
"b":
14
,
"b":
23
,
"a": 255
"a": 255
},
},
"_width": 6,
"_width": 6,
...
@@ -4258,6 +4258,12 @@
...
@@ -4258,6 +4258,12 @@
"_components": [
"_components": [
{
{
"__id__": 98
"__id__": 98
},
{
"__id__": 99
},
{
"__id__": 100
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4271,20 +4277,20 @@
...
@@ -4271,20 +4277,20 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
12
80,
"width":
7
80,
"height": 30
"height": 30
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x":
0.5
,
"x":
1
,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
64
0,
-341
,
315
,
0,
0,
0,
0,
0,
0,
...
@@ -4306,7 +4312,7 @@
...
@@ -4306,7 +4312,7 @@
"_is3DNode": false,
"_is3DNode": false,
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"_id": "
30xV2vpmdOeqx45F2iY36d
"
"_id": "
52btPG45tL0InSMuKCrFxC
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -4345,7 +4351,7 @@
...
@@ -4345,7 +4351,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
44
,
-
50
,
0,
0,
0,
0,
0,
0,
...
@@ -4439,8 +4445,8 @@
...
@@ -4439,8 +4445,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0
,
-93
,
0
,
-1
,
0,
0,
0,
0,
0,
0,
...
@@ -4496,6 +4502,68 @@
...
@@ -4496,6 +4502,68 @@
"_atlas": null,
"_atlas": null,
"_id": "06yCQ5yl5LDLPKtEid9n6V"
"_id": "06yCQ5yl5LDLPKtEid9n6V"
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": false,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "379q3VZPxF35Y4uHraUMwZ"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 780,
"height": 30
},
"_resize": 0,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 30,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 2,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 1,
"_N$affectedByScale": true,
"_id": "b8BkZ+DQ1E3ZR93xOFmeZG"
},
{
{
"__type__": "cc.Widget",
"__type__": "cc.Widget",
"_name": "",
"_name": "",
...
@@ -4506,11 +4574,11 @@
...
@@ -4506,11 +4574,11 @@
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags":
44
,
"_alignFlags":
33
,
"_left": 0,
"_left": 0,
"_right": 0,
"_right": 0,
"_top": 0,
"_top":
3
0,
"_bottom":
4
,
"_bottom":
0
,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsLeft": true,
...
@@ -4519,9 +4587,9 @@
...
@@ -4519,9 +4587,9 @@
"_isAbsBottom": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth":
128
0,
"_originalWidth": 0,
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "
19tmH5uNFGIaSe/DxTiXGh
"
"_id": "
ecMxksS+BCgIAF27fSd43e
"
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
...
@@ -4534,7 +4602,7 @@
...
@@ -4534,7 +4602,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
0
"__id__": 10
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4590,7 +4658,7 @@
...
@@ -4590,7 +4658,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
99
"__id__":
101
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4626,19 +4694,19 @@
...
@@ -4626,19 +4694,19 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 10
2
"__id__": 10
4
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
5
"__id__": 10
7
},
},
{
{
"__id__": 10
6
"__id__": 10
8
},
},
{
{
"__id__": 10
7
"__id__": 10
9
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4694,16 +4762,16 @@
...
@@ -4694,16 +4762,16 @@
"_name": "timer1",
"_name": "timer1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 10
1
"__id__": 10
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 10
3
"__id__": 10
5
},
},
{
{
"__id__": 10
4
"__id__": 10
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4759,7 +4827,7 @@
...
@@ -4759,7 +4827,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
2
"__id__": 10
4
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4794,7 +4862,7 @@
...
@@ -4794,7 +4862,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
2
"__id__": 10
4
},
},
"_enabled": true,
"_enabled": true,
"_color": {
"_color": {
...
@@ -4812,7 +4880,7 @@
...
@@ -4812,7 +4880,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
1
"__id__": 10
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -4847,7 +4915,7 @@
...
@@ -4847,7 +4915,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
1
"__id__": 10
3
},
},
"_enabled": true,
"_enabled": true,
"_color": {
"_color": {
...
@@ -4865,7 +4933,7 @@
...
@@ -4865,7 +4933,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 10
1
"__id__": 10
3
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -4898,7 +4966,7 @@
...
@@ -4898,7 +4966,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
09
"__id__": 1
11
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -4954,7 +5022,7 @@
...
@@ -4954,7 +5022,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
08
"__id__": 1
10
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -5057,10 +5125,10 @@
...
@@ -5057,10 +5125,10 @@
"__id__": 16
"__id__": 16
},
},
"timer": {
"timer": {
"__id__": 10
5
"__id__": 10
7
},
},
"timer1": {
"timer1": {
"__id__": 10
3
"__id__": 10
5
},
},
"_id": "e687yyoRBIzZAOVRL8Sseh"
"_id": "e687yyoRBIzZAOVRL8Sseh"
},
},
...
@@ -5073,10 +5141,10 @@
...
@@ -5073,10 +5141,10 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 11
4
"__id__": 11
6
},
},
{
{
"__id__": 1
19
"__id__": 1
21
}
}
],
],
"_active": true,
"_active": true,
...
@@ -5134,12 +5202,9 @@
...
@@ -5134,12 +5202,9 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 113
},
"_children": [
{
"__id__": 115
"__id__": 115
},
},
"_children": [
{
{
"__id__": 117
"__id__": 117
}
}
...
@@ -5199,13 +5264,17 @@
...
@@ -5199,13 +5264,17 @@
"_name": "icon_0",
"_name": "icon_0",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
},
"_children": [],
"_children": [
{
"__id__": 118
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
16
"__id__": 1
20
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5256,50 +5325,18 @@
...
@@ -5256,50 +5325,18 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": "74Mb5j32tA8ZlEVbMzM+Go"
"_id": "74Mb5j32tA8ZlEVbMzM+Go"
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 115
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f621cffd-d037-44bf-9a08-6255948a6102"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8cj+HJcTZE7av8/qic6e4+"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "icon_1",
"_name": "icon_1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
4
"__id__": 11
7
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 11
8
"__id__": 11
9
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5325,7 +5362,7 @@
...
@@ -5325,7 +5362,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
178.913
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -5355,9 +5392,9 @@
...
@@ -5355,9 +5392,9 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 11
7
"__id__": 11
8
},
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"_materials": [
"_materials": [
{
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
...
@@ -5382,16 +5419,48 @@
...
@@ -5382,16 +5419,48 @@
"_atlas": null,
"_atlas": null,
"_id": "76ASsItQpBOLgqPb+9Mf8Y"
"_id": "76ASsItQpBOLgqPb+9Mf8Y"
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f621cffd-d037-44bf-9a08-6255948a6102"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8cj+HJcTZE7av8/qic6e4+"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 11
3
"__id__": 11
5
},
},
"_children": [
"_children": [
{
{
"__id__": 12
0
"__id__": 12
2
}
}
],
],
"_active": true,
"_active": true,
...
@@ -5449,13 +5518,13 @@
...
@@ -5449,13 +5518,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
19
"__id__": 1
21
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 12
1
"__id__": 12
3
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5511,7 +5580,7 @@
...
@@ -5511,7 +5580,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 12
0
"__id__": 12
2
},
},
"_enabled": true,
"_enabled": true,
"_clip": null,
"_clip": null,
...
...
play/assets/WL01/scene/WL01.js
View file @
ddf1ee56
...
@@ -233,24 +233,24 @@ cc.Class({
...
@@ -233,24 +233,24 @@ cc.Class({
flag_area
.
removeAllChildren
();
flag_area
.
removeAllChildren
();
let
node
=
cc
.
find
(
'
res/img/icon_0
'
);
let
node
=
cc
.
find
(
'
res/img/icon_0
'
);
let
mouses
=
this
.
data
.
mouses
;
let
mouses
=
this
.
data
.
mouses
;
let
item
,
len
=
mouses
.
length
;
let
space
=
4
;
let
_w
=
node
.
width
;
let
starx
=
len
*
(
_w
+
space
)
-
space
;
let
lyt
=
flag_area
.
getComponent
(
cc
.
Layout
);
starx
=
(
starx
*
0.5
)
*
-
1
-
_w
/
2
;
let
width
=
flag_area
.
width
-
lyt
.
paddingRight
;
let
padding_x
=
lyt
.
spacingX
;
let
item
,
len
=
mouses
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
){
for
(
let
i
=
0
;
i
<
len
;
i
++
){
item
=
cc
.
instantiate
(
node
);
item
=
cc
.
instantiate
(
node
);
flag_area
.
addChild
(
item
);
flag_area
.
addChild
(
item
);
item
.
y
=
0
;
item
.
y
=
0
;
item
.
x
=
starx
+
i
*
(
_w
+
space
);
item
.
scale
=
this
.
Between
(
0.5
,
(
width
/
len
-
padding_x
)
/
item
.
width
,
1
);
}
}
this
.
_flag_index
=
0
;
this
.
_flag_index
=
0
;
cb
&&
cb
();
cb
&&
cb
();
},
},
nextMouse
(){
nextMouse
(){
let
item
,
len
=
this
.
mouses
.
length
;
let
item
,
len
=
this
.
mouses
.
length
;
let
mouse_id
=
RandomInt
(
len
)
let
mouse_id
=
RandomInt
(
len
)
...
@@ -329,11 +329,15 @@ cc.Class({
...
@@ -329,11 +329,15 @@ cc.Class({
updateFlag
(){
updateFlag
(){
if
(
this
.
_flag_index
>=
this
.
data
.
mouses
.
length
)
if
(
this
.
_flag_index
>=
this
.
data
.
mouses
.
length
)
return
;
return
;
let
idx
=
this
.
data
.
mouses
.
length
-
this
.
_flag_index
-
1
;
let
area
=
cc
.
find
(
'
Canvas/flag_area
'
);
let
area
=
cc
.
find
(
'
Canvas/flag_area
'
);
let
flag
=
area
.
children
[
this
.
_flag_index
].
getComponent
(
cc
.
Sprite
);
let
flag
=
area
.
children
[
idx
].
getComponent
(
cc
.
Sprite
);
let
icon
=
cc
.
find
(
'
res/img/icon_1
'
).
getComponent
(
cc
.
Sprite
);
flag
.
enabled
=
false
;
flag
.
spriteFrame
=
icon
.
spriteFrame
;
cc
.
tween
(
flag
.
node
)
let
flag1
=
flag
.
node
.
children
[
0
];
flag1
.
getComponent
(
cc
.
Sprite
).
enabled
=
true
;
cc
.
tween
(
flag1
)
.
to
(
0.1
,
{
scale
:
1.2
},{
easing
:
'
quadIn
'
})
.
to
(
0.1
,
{
scale
:
1.2
},{
easing
:
'
quadIn
'
})
.
to
(
0.2
,
{
scale
:
0.8
},{
easing
:
'
quadOut
'
})
.
to
(
0.2
,
{
scale
:
0.8
},{
easing
:
'
quadOut
'
})
.
to
(
0.1
,
{
scale
:
1
},{
easing
:
'
quadIn
'
})
.
to
(
0.1
,
{
scale
:
1
},{
easing
:
'
quadIn
'
})
...
@@ -383,6 +387,9 @@ cc.Class({
...
@@ -383,6 +387,9 @@ cc.Class({
},
},
// update (dt) {},
// update (dt) {},
Between
(
a
,
b
,
c
)
{
return
[
a
,
b
,
c
].
sort
()[
1
];
},
// ------------------------------------------------
// ------------------------------------------------
getSprNode
(
resName
)
{
getSprNode
(
resName
)
{
...
...
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