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
054ef3eb
Commit
054ef3eb
authored
Dec 15, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单题流程完成
parent
d63c7707
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
dg28_drag.fire
assets/dg28_drag/scene/dg28_drag.fire
+12
-12
dg28_drag.ts
assets/dg28_drag/scene/dg28_drag.ts
+18
-11
No files found.
assets/dg28_drag/scene/dg28_drag.fire
View file @
054ef3eb
...
@@ -1941,7 +1941,7 @@
...
@@ -1941,7 +1941,7 @@
"_groupIndex": 0,
"_groupIndex": 0,
"groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"showInEditor": false,
"_id": "
01B50V6MlFwpm66MJrGabq
"
"_id": "
e8Oflf655LyJDaC6jWoQHl
"
},
},
{
{
"__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": "
86sS+04GpN5712QMjoqFOa
"
"_id": "
3cKzD8chlJF6BXy9VBb/sL
"
},
},
{
{
"__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": "
b8iKdSW/1D6YdbAdrra8ly
"
"_id": "
75vLHgx0JFq6GxbAPMvLlh
"
},
},
{
{
"__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": "
2aDfhzv/VERrMhxbaLTjCV
"
"_id": "
821B2OXItMkKHvk3F28Pfn
"
},
},
{
{
"__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": "
07ghmy0wVFDre7Jz6EXPnG
"
"_id": "
40yaE3AHhLRpr0mihD+7vN
"
},
},
{
{
"__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": "
a6NPUHpChANb+hEgNFs4Yr
"
"_id": "
04j6e78ZZB4YUYsUumcks8
"
},
},
{
{
"__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": "
08KESWyHtJBq6DnltGafbG
"
"_id": "
3a23/YdllDjoAaQEwmhdKt
"
},
},
{
{
"__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": "
4dNJpFg55CNrN6ZYbYrUud
"
"_id": "
b139KqOCJPrqH5C8nk82Us
"
},
},
{
{
"__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": "
41/KsgMiJJDrIoGWuL2Gga
"
"_id": "
a2ukaDOexGvJ9duDv0KKBt
"
},
},
{
{
"__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": "
c9svdq8AhDhJQdDeT8NyYA
"
"_id": "
f1nVMg941P458Nlw5csRZX
"
},
},
{
{
"__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": "
8eissyzgxOQ4Fl5i4s6iZT
"
"_id": "
9bfx2BTIRCUJwToI+YDQpm
"
},
},
{
{
"__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": "
42pLFn86BEYrJC9D00wQbn
"
"_id": "
8dQ6TsswhLAYO+GsiBgJjH
"
},
},
{
{
"__type__": "cc.RichText",
"__type__": "cc.RichText",
...
...
assets/dg28_drag/scene/dg28_drag.ts
View file @
054ef3eb
...
@@ -104,7 +104,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -104,7 +104,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 更新派
// 更新派
// this.initLayoutPie();
// this.initLayoutPie();
}
}
static
successPosArray
:
Array
<
cc
.
Vec2
>
=
[
cc
.
v2
(
50
,
-
30
),
cc
.
v2
(
0
,
0
)];
static
successPosArray
:
Array
<
cc
.
Vec2
>
=
[
cc
.
v2
(
50
,
-
30
),
cc
.
v2
(
5
0
,
0
)];
private
successArr
:
Array
<
cc
.
Node
>
;
private
successArr
:
Array
<
cc
.
Node
>
;
get
successPos
()
{
get
successPos
()
{
return
SceneComponent
.
successPosArray
[
this
.
successArr
.
length
]
return
SceneComponent
.
successPosArray
[
this
.
successArr
.
length
]
...
@@ -185,6 +185,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -185,6 +185,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
onTouchMeetEnd
(
event
)
{
onTouchMeetEnd
(
event
)
{
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
node
.
data
.
id
!=
this
.
currentQuestion
.
id
)
return
;
if
(
node
!=
this
.
meetCurrentNode
)
return
;
if
(
node
!=
this
.
meetCurrentNode
)
return
;
let
x
=
node
.
x
;
let
x
=
node
.
x
;
let
y
=
node
.
y
;
let
y
=
node
.
y
;
...
@@ -295,6 +298,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -295,6 +298,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
onTouchVegetableEnd
(
event
)
{
onTouchVegetableEnd
(
event
)
{
let
node
=
event
.
target
;
let
node
=
event
.
target
;
if
(
!
node
.
data
)
node
=
node
.
parent
;
if
(
!
node
||
!
node
.
data
)
return
;
if
(
node
.
data
.
id
!=
this
.
currentQuestion
.
id
)
return
;
if
(
node
!=
this
.
vegetableCurrentNode
)
return
;
if
(
node
!=
this
.
vegetableCurrentNode
)
return
;
let
x
=
node
.
x
;
let
x
=
node
.
x
;
let
y
=
node
.
y
;
let
y
=
node
.
y
;
...
@@ -336,12 +342,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -336,12 +342,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
static
pieDefaultPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
58.632
);
static
pieDefaultPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
58.632
);
static
pieStartPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
693.308
);
static
pieStartPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
693.308
);
showPie
()
{
showPie
()
{
if
(
1
)
return
;
this
.
scheduleOnce
(()
=>
{
let
node
=
pg
.
view
.
clone
(
this
.
item_pie
);
let
node
=
pg
.
view
.
clone
(
this
.
item_pie
);
this
.
layout_pie
.
addChild
(
node
)
this
.
layout_pie
.
addChild
(
node
)
node
.
x
=
SceneComponent
.
pieDefaultPos
.
x
;
node
.
x
=
SceneComponent
.
pieStartPos
.
x
;
node
.
y
=
SceneComponent
.
pieDefaultPos
.
y
;
node
.
y
=
SceneComponent
.
pieStartPos
.
y
;
this
.
updateItemPie
(
node
,
this
.
currentQuestion
);
this
.
updateItemPie
(
node
,
this
.
currentQuestion
);
cc
.
tween
(
node
)
.
to
(
0.5
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
-
50
})
.
to
(
0.06
,
{
x
:
SceneComponent
.
pieDefaultPos
.
x
,
y
:
SceneComponent
.
pieDefaultPos
.
y
})
.
start
();
},
0.2
)
}
}
//标题刷新 标题如果不配置,就不显示那个黄色标题小标签。 三种情况 题干无、题干有、题干图片+文字 文字默认颜色和高亮颜色都是不同的。超框体缩字。
//标题刷新 标题如果不配置,就不显示那个黄色标题小标签。 三种情况 题干无、题干有、题干图片+文字 文字默认颜色和高亮颜色都是不同的。超框体缩字。
updateItemPie
(
item
,
data
)
{
updateItemPie
(
item
,
data
)
{
...
@@ -363,10 +374,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -363,10 +374,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
}
else
{
text
.
active
=
false
;
text
.
active
=
false
;
}
}
let
bg_title
=
pg
.
view
.
find
(
item
,
'
bg_title
'
);
bg_title
.
active
=
!!
data
.
title
pg
.
view
.
setString
(
pg
.
view
.
find
(
bg_title
,
'
label
'
),
data
.
title
);
}
}
//-------------------------------中间区域---------------------------------
//-------------------------------中间区域---------------------------------
static
mainDefaultPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
-
93.308
);
static
mainDefaultPos
:
cc
.
Vec2
=
cc
.
v2
(
48.822
,
-
93.308
);
...
...
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