Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
east-10
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
east-10
Commits
7dc86ead
Commit
7dc86ead
authored
Jun 15, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ 完成判定
+ 强制完成,测试使用
parent
f350e187
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
scene.fire
play/assets/scene/scene/scene.fire
+2
-2
scene.js
play/assets/scene/scene/scene.js
+17
-1
kind.js
play/assets/scene/script/kind.js
+2
-2
No files found.
play/assets/scene/scene/scene.fire
View file @
7dc86ead
...
...
@@ -5685,8 +5685,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "
button
",
"_N$string": "
button
",
"_string": "
强制完成
",
"_N$string": "
强制完成
",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
...
...
play/assets/scene/scene/scene.js
View file @
7dc86ead
...
...
@@ -233,9 +233,13 @@ cc.Class({
let
ot
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
ot
.
copyValues
(
selected
);
ot
.
selected
(
true
);
kind
.
showCorrect
(
node
);
kind
.
showCorrect
(
node
,
()
=>
{
if
(
this
.
tryFinish
())
this
.
pageFinish
();
});
selected
.
target
.
removeFromParent
();
selected
.
target
=
null
;
break
;
}
}
...
...
@@ -566,6 +570,18 @@ cc.Class({
//this.resetData();
},
tryFinish
(){
let
item
,
op
,
len
=
this
.
_move_area
.
childrenCount
;
for
(
let
i
=
0
;
i
<
len
;
i
++
){
item
=
this
.
_move_area
.
children
[
i
];
op
=
item
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
if
(
op
.
kind_id
>=
0
){
return
false
;
}
}
return
true
;
},
update
(
dt
)
{
if
(
!
this
.
_moved
)
return
;
...
...
play/assets/scene/script/kind.js
View file @
7dc86ead
...
...
@@ -97,7 +97,7 @@ cc.Class({
playDragonBoneAnimation
(
this
.
animate_node
,
'
newAnimation
'
,
1
,
cb
);
},
showCorrect
(
ot
){
showCorrect
(
ot
,
cb
){
ot
.
x
=
0
;
ot
.
y
=
0
;
let
item
=
ot
.
getComponent
(
cc
.
js
.
getClassByName
(
'
WordOption
'
));
...
...
@@ -118,7 +118,7 @@ cc.Class({
.
call
(()
=>
{
option
.
adjustPicSize
();
console
.
log
(
option
);
cb
&&
cb
();
})
.
start
();
this
.
show_node
.
active
=
false
;
...
...
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