Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg28_drag
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
dg28_drag
Commits
1d6c8d21
Commit
1d6c8d21
authored
Dec 16, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
展示完成
parent
fe0ee2df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
26 deletions
+37
-26
dg28_drag.fire
assets/dg28_drag/scene/dg28_drag.fire
+24
-24
dg28_drag.ts
assets/dg28_drag/scene/dg28_drag.ts
+13
-2
No files found.
assets/dg28_drag/scene/dg28_drag.fire
View file @
1d6c8d21
...
@@ -1941,7 +1941,7 @@
...
@@ -1941,7 +1941,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
87c+HiX6lPyILFw6y2qm+0
"
"_id": "
078Livaq1K7YvWrHDlhn2g
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -1974,7 +1974,7 @@
...
@@ -1974,7 +1974,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
faTfxzw4VGtp5Bv33XYvhI
"
"_id": "
c4eAUnOIVJOJQbNBaCIQJr
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -2037,7 +2037,7 @@
...
@@ -2037,7 +2037,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
ebfz4fXjhFNIJCOPJUg+xe
"
"_id": "
49s5P8NjhKypw5sYK3fpka
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -2070,7 +2070,7 @@
...
@@ -2070,7 +2070,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
737cu084NBc4pRna5LhZAJ
"
"_id": "
edXP76nntCD71XGw8ErRk3
"
},
},
{
{
"__type__": "cc.RichText",
"__type__": "cc.RichText",
...
@@ -2579,7 +2579,7 @@
...
@@ -2579,7 +2579,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
dfI18MzjxI4ox9793IWq6g
"
"_id": "
aeg3iujAND0b5MKjNP4NNG
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -2612,7 +2612,7 @@
...
@@ -2612,7 +2612,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
66VxFP8RZG1obHBa2zX+dW
"
"_id": "
8aoQ4I9ytCJp4owAgUSXpg
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -2675,7 +2675,7 @@
...
@@ -2675,7 +2675,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
84Z1ZmR2JNbpfzxQpqS7rA
"
"_id": "
a3d7PXnRpLsbM2LMWI0QtU
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -2708,7 +2708,7 @@
...
@@ -2708,7 +2708,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
3fNv2bNbRF4Yf2X5OW4gCS
"
"_id": "
50lq7yZ0ZGxq44pU0Z7DGM
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -2771,7 +2771,7 @@
...
@@ -2771,7 +2771,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
ee7/K8ZmpGJ4PsbHDNVJsj
"
"_id": "
1243ke+XNGJo61PXMndjbX
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -2804,7 +2804,7 @@
...
@@ -2804,7 +2804,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
d0R1NQ5s1EwLbGmm/b7qXq
"
"_id": "
1fYwHVPY1Hjb9NYddLWFSg
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -2867,7 +2867,7 @@
...
@@ -2867,7 +2867,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
6fQ+PYYMBObYSeyQErdCaE
"
"_id": "
588ZZbGwBJ5J6xAk/q9bdy
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -2900,7 +2900,7 @@
...
@@ -2900,7 +2900,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
92cFPUhutEfJJ/7M9hPYL+
"
"_id": "
4cRuaTqYRFwLL1tUzXsIbJ
"
},
},
{
{
"__type__": "cc.RichText",
"__type__": "cc.RichText",
...
@@ -3227,7 +3227,7 @@
...
@@ -3227,7 +3227,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
29WlYPwRVPppB3VVMv7auW
"
"_id": "
6cA9TxVLNBaZCXqufhAmA5
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3260,7 +3260,7 @@
...
@@ -3260,7 +3260,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
c1TxAYANBPcKHwYn+G4leQ
"
"_id": "
b8cIWXOeVBMrlM9Y8zV5r5
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -3323,7 +3323,7 @@
...
@@ -3323,7 +3323,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
ddl8mZ9dZGDL9V3+OZyuQQ
"
"_id": "
90uj5kGFJA/KtDcWLP7Bxq
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3356,7 +3356,7 @@
...
@@ -3356,7 +3356,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
daSyfg5SRFsaCQh++cKlRm
"
"_id": "
45TUY0N9BJeJe5hd7AAeE/
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -3419,7 +3419,7 @@
...
@@ -3419,7 +3419,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
1ezICw1iNDj7asTwceHkQs
"
"_id": "
c2D5+dvKRFlpot1BahMGRJ
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3452,7 +3452,7 @@
...
@@ -3452,7 +3452,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
22ziNdbQdM5bBpzq662GrS
"
"_id": "
80T/CWz3FLOqsJX2THqpyJ
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -3515,7 +3515,7 @@
...
@@ -3515,7 +3515,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
d444u0iBtKlLd70wV/oax8
"
"_id": "
5bKpNgYOBMfLo5P/E4jzQ9
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3548,7 +3548,7 @@
...
@@ -3548,7 +3548,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
56wuEVw7NEepCj2LNl3PIY
"
"_id": "
2bHy3szeRC6L0VTRIdkpFF
"
},
},
{
{
"__type__": "cc.PrivateNode",
"__type__": "cc.PrivateNode",
...
@@ -3611,7 +3611,7 @@
...
@@ -3611,7 +3611,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
d3M6i1WuxLq4cjYX8Lg8zy
"
"_id": "
54E+LKhX5K57KMII0mDwMC
"
},
},
{
{
"__type__": "cc.Label",
"__type__": "cc.Label",
...
@@ -3644,7 +3644,7 @@
...
@@ -3644,7 +3644,7 @@
"_N$fontFamily": "Arial",
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 0,
"_id": "
1aj+BhjkxOfpTPwjidR/Ll
"
"_id": "
97V2zzGKFIdJ1Uj5xg5UPt
"
},
},
{
{
"__type__": "cc.RichText",
"__type__": "cc.RichText",
...
@@ -3805,8 +3805,8 @@
...
@@ -3805,8 +3805,8 @@
0,
0,
0,
0,
1,
1,
1
,
2
,
1
,
2
,
1
1
]
]
},
},
...
...
assets/dg28_drag/scene/dg28_drag.ts
View file @
1d6c8d21
...
@@ -163,6 +163,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -163,6 +163,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
meetCurrentNode
:
cc
.
Node
;
meetCurrentNode
:
cc
.
Node
;
onTouchMeetStart
(
event
)
{
onTouchMeetStart
(
event
)
{
if
(
this
.
guide
==
1
)
return
;
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
!
node
||
!
node
.
data
)
return
;
...
@@ -171,6 +172,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -171,6 +172,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node
.
cPos
=
cc
.
v2
(
node
);
node
.
cPos
=
cc
.
v2
(
node
);
}
}
onTouchMeetMove
(
event
)
{
onTouchMeetMove
(
event
)
{
if
(
this
.
guide
==
1
)
return
;
// 移动
// 移动
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
...
@@ -184,6 +186,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -184,6 +186,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node
.
y
+=
pos
.
y
;
node
.
y
+=
pos
.
y
;
}
}
onTouchMeetEnd
(
event
)
{
onTouchMeetEnd
(
event
)
{
if
(
this
.
guide
==
1
)
return
;
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
!
node
||
!
node
.
data
)
return
;
...
@@ -202,6 +205,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -202,6 +205,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
}
}
onMeetSuccess
(
node
)
{
onMeetSuccess
(
node
)
{
if
(
this
.
guide
==
0
)
this
.
guide
=
1
;
node
.
scale
=
1.4
;
node
.
scale
=
1.4
;
node
.
x
=
this
.
successPos
.
x
;
node
.
x
=
this
.
successPos
.
x
;
node
.
y
=
this
.
successPos
.
y
;
node
.
y
=
this
.
successPos
.
y
;
...
@@ -277,6 +281,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -277,6 +281,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
vegetableCurrentNode
:
cc
.
Node
;
vegetableCurrentNode
:
cc
.
Node
;
onTouchVegetableStart
(
event
)
{
onTouchVegetableStart
(
event
)
{
if
(
this
.
guide
==
0
)
return
;
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
!
node
||
!
node
.
data
)
return
;
...
@@ -285,6 +290,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -285,6 +290,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node
.
cPos
=
cc
.
v2
(
node
);
node
.
cPos
=
cc
.
v2
(
node
);
}
}
onTouchVegetableMove
(
event
)
{
onTouchVegetableMove
(
event
)
{
if
(
this
.
guide
==
0
)
return
;
// 移动
// 移动
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
...
@@ -298,6 +304,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -298,6 +304,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node
.
y
+=
pos
.
y
;
node
.
y
+=
pos
.
y
;
}
}
onTouchVegetableEnd
(
event
)
{
onTouchVegetableEnd
(
event
)
{
if
(
this
.
guide
==
0
)
return
;
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
!
node
||
!
node
.
data
)
return
;
...
@@ -316,6 +323,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -316,6 +323,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
}
}
onVegetableSuccess
(
node
)
{
onVegetableSuccess
(
node
)
{
if
(
this
.
guide
==
1
)
this
.
guide
=
2
;
node
.
scale
=
1.4
;
node
.
scale
=
1.4
;
node
.
x
=
this
.
successPos
.
x
;
node
.
x
=
this
.
successPos
.
x
;
node
.
y
=
this
.
successPos
.
y
;
node
.
y
=
this
.
successPos
.
y
;
...
@@ -353,6 +361,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -353,6 +361,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
tween
(
node
)
cc
.
tween
(
node
)
.
to
(
0.5
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
-
50
})
.
to
(
0.5
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
-
50
})
.
to
(
0.06
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
})
.
to
(
0.06
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
})
.
call
(()
=>
{
let
ani
=
pg
.
view
.
find
(
node
,
'
ani
'
)
ani
.
active
=
true
;
pg
.
view
.
playDBAnimation
(
ani
,
'
normal
'
,
1
)
})
.
start
();
.
start
();
},
0.2
)
},
0.2
)
}
}
...
@@ -454,8 +467,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -454,8 +467,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
onTouchLast
()
{
onTouchLast
()
{
}
}
//-----------------------------------引导部分------------------------------------
//-----------------------------------引导部分------------------------------------
// 先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。
// 先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。
...
...
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