Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
comparetree
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
comparetree
Commits
4f707d8e
Commit
4f707d8e
authored
Jun 16, 2021
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
b6dc43d5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
48 additions
and
54 deletions
+48
-54
scene.fire
play/assets/scene/scene/scene.fire
+33
-33
scene.js
play/assets/scene/scene/scene.js
+6
-12
title_bg.png.meta
play/assets/scene/textures/compare/bg/title_bg.png.meta
+1
-1
chose.png.meta
play/assets/scene/textures/compare/box/chose.png.meta
+1
-1
combined-shape_3.png.meta
...sets/scene/textures/compare/box/combined-shape_3.png.meta
+1
-1
combined-shape_4.png.meta
...sets/scene/textures/compare/box/combined-shape_4.png.meta
+1
-1
oval-18.png.meta
play/assets/scene/textures/compare/box/oval-18.png.meta
+1
-1
oval-2-copy-10.png.meta
...assets/scene/textures/compare/box/oval-2-copy-10.png.meta
+1
-1
oval-2-copy-9.png.meta
.../assets/scene/textures/compare/box/oval-2-copy-9.png.meta
+1
-1
oval-2-copy.png.meta
play/assets/scene/textures/compare/box/oval-2-copy.png.meta
+1
-1
success.png.meta
play/assets/scene/textures/compare/box/success.png.meta
+1
-1
No files found.
play/assets/scene/scene/scene.fire
View file @
4f707d8e
...
...
@@ -738,7 +738,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ca14e2fd-63e3-4c46-8eec-91fd20af5f60"
...
...
@@ -837,8 +837,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "
Read and classify the words
",
"_N$string": "
Read and classify the words
",
"_string": "",
"_N$string": "",
"_fontSize": 27,
"_lineHeight": 40,
"_enableWrapText": true,
...
...
@@ -853,7 +853,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow":
0
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "a2BOp+Uy5MHLpnYBX+6/W+"
},
...
...
@@ -2511,7 +2511,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "577b0319-8a9a-4503-ab96-f3dd5b000a53"
...
...
@@ -2555,7 +2555,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
40.27
,
"width": 1
80
,
"height": 50.4
},
"_anchorPoint": {
...
...
@@ -2610,7 +2610,7 @@
"_string": "animal",
"_N$string": "animal",
"_fontSize": 42,
"_lineHeight": 4
0
,
"_lineHeight": 4
5
,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
...
...
@@ -2623,7 +2623,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow":
0
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "e94TUSrRxLwoxQpQFZLleL"
},
...
...
@@ -2803,7 +2803,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "39ce2398-164a-4dba-829f-646ed523cd4a"
...
...
@@ -2847,7 +2847,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
03.32
,
"width": 1
80
,
"height": 50.4
},
"_anchorPoint": {
...
...
@@ -2915,7 +2915,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow":
0
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "352Zi2NBJGYKeMbWzimzMd"
},
...
...
@@ -3091,7 +3091,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "817eb1a2-dace-4cc4-8f23-4a03b692dbb6"
...
...
@@ -3135,7 +3135,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
93.25
,
"width":
150
,
"height": 50.4
},
"_anchorPoint": {
...
...
@@ -3148,7 +3148,7 @@
"ctor": "Float64Array",
"array": [
-1.798,
4.552
,
3
,
0,
0,
0,
...
...
@@ -3190,7 +3190,7 @@
"_string": "food",
"_N$string": "food",
"_fontSize": 42,
"_lineHeight": 4
0
,
"_lineHeight": 4
5
,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "f792997f-f029-4df1-9adb-5e28c3e1a1c4"
...
...
@@ -3203,7 +3203,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow":
0
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "4dOWUWrcJLNoAOLcPD5MkO"
},
...
...
@@ -3435,7 +3435,7 @@
"__id__": 67
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 69
...
...
@@ -3502,7 +3502,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "43bb4581-6acd-4928-9a46-b10ee983cb60"
...
...
@@ -3596,7 +3596,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "49454315-2fbc-49d7-980b-03990d784088"
...
...
@@ -3640,7 +3640,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1
5
0,
"width": 1
4
0,
"height": 50.4
},
"_anchorPoint": {
...
...
@@ -3926,7 +3926,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "14e8da8f-dacf-4974-a738-0b9bc5747dac"
...
...
@@ -4020,7 +4020,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "86d42669-be71-4333-a47a-e75f1d141a5c"
...
...
@@ -4158,8 +4158,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
8
0,
"height":
48
"width":
12
0,
"height":
52
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4214,7 +4214,7 @@
"__uuid__": "405a5ae7-9f20-4d23-8681-455a17ac3514"
},
"_type": 0,
"_sizeMode":
1
,
"_sizeMode":
0
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -4304,8 +4304,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "
chicken
",
"_N$string": "
chicken
",
"_string": "
qabfsss
",
"_N$string": "
qabfsss
",
"_fontSize": 38,
"_lineHeight": 40,
"_enableWrapText": true,
...
...
@@ -4470,10 +4470,10 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "
milk
",
"_N$string": "
milk
",
"_string": "
qabf
",
"_N$string": "
qabf
",
"_fontSize": 30,
"_lineHeight":
30
,
"_lineHeight":
43
,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "5d8c6a7f-89af-4150-a1e1-c687492e05c3"
...
...
@@ -4498,7 +4498,7 @@
"__id__": 86
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 90
...
...
@@ -4515,7 +4515,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
60
,
"width":
81
,
"height": 36
},
"_anchorPoint": {
...
...
@@ -4597,7 +4597,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "efc40866-ef82-4fac-b41b-99795e03cf96"
...
...
play/assets/scene/scene/scene.js
View file @
4f707d8e
...
...
@@ -491,6 +491,7 @@ cc.Class({
this
.
updateItem
(
item
);
},
initButton
(
item
)
{
item
.
_cusStartPos
=
cc
.
v2
(
item
.
x
,
item
.
y
);
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onStartItem
,
this
);
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onEndItem
,
this
);
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
this
.
onMoveItem
,
this
);
...
...
@@ -502,7 +503,7 @@ cc.Class({
let
item
=
touch
.
target
;
if
(
item
.
moveState
==
2
)
return
;
//判断是否是在原地并没有到处移动
this
.
_startPos
=
cc
.
v2
(
touch
.
target
.
x
,
touch
.
target
.
y
);
this
.
_startPos
=
touch
.
target
.
_cusStartPos
;
//
cc.v2(touch.target.x, touch.target.y);
},
//1.移动效果--在节点上绑定一个运动的type 根据type来刷新按钮效果 刷新type的方法,和具体的执行的时候刷新type
//2.成功效果--
...
...
@@ -511,24 +512,17 @@ cc.Class({
if
(
this
.
_cantouch
!=
1
)
return
;
this
.
_cantouch
=
2
;
let
item
=
touch
.
target
;
if
(
item
.
moveState
==
2
)
return
;
if
(
item
.
moveState
==
3
)
return
;
let
startPos
=
item
.
parent
.
convertToNodeSpaceAR
(
touch
.
getStartLocation
());
let
touchPos
=
item
.
parent
.
convertToNodeSpaceAR
(
touch
.
getLocation
());
//判断是否是在原地并没有到处移动
if
(
this
.
checkCollider
({
x
:
touchPos
.
x
,
y
:
touchPos
.
y
},
{
x
:
this
.
_startPos
.
x
,
y
:
this
.
_startPos
.
y
,
width
:
15
,
//item.width,
height
:
15
,
//item.height
}))
{
if
(
Math
.
abs
(
startPos
.
x
-
touchPos
.
x
)
<
50
&&
Math
.
abs
(
startPos
.
y
-
touchPos
.
y
)
<
50
)
{
//回归原位
this
.
backItem
(
item
,
this
.
_startPos
);
item
.
moveState
!=
2
&&
this
.
backItem
(
item
,
this
.
_startPos
);
//变换动画
ani
.
flipX0
(
item
).
then
(()
=>
{
item
.
cardState
=
item
.
cardState
==
0
?
1
:
0
;
item
.
moveState
!=
2
&&
this
.
backItem
(
item
,
this
.
_startPos
);
this
.
updateItem
(
item
);
ani
.
flipX1
(
item
);
this
.
_cantouch
=
0
;
...
...
play/assets/scene/textures/compare/bg/title_bg.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 502,
...
...
play/assets/scene/textures/compare/box/chose.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 150,
...
...
play/assets/scene/textures/compare/box/combined-shape_3.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 430,
...
...
play/assets/scene/textures/compare/box/combined-shape_4.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 470,
...
...
play/assets/scene/textures/compare/box/oval-18.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 208,
...
...
play/assets/scene/textures/compare/box/oval-2-copy-10.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 186,
...
...
play/assets/scene/textures/compare/box/oval-2-copy-9.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 186,
...
...
play/assets/scene/textures/compare/box/oval-2-copy.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 154,
...
...
play/assets/scene/textures/compare/box/success.png.meta
View file @
4f707d8e
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 124,
...
...
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