Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L211
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
DF-L211
Commits
7461a249
Commit
7461a249
authored
Jul 06, 2021
by
LMZ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 重玩按钮 隐藏还能点击; 重玩后图片消失
parent
58646637
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
Exercises.ts
src/app/play/Exercises.ts
+5
-1
play.component.ts
src/app/play/play.component.ts
+21
-3
No files found.
src/app/play/Exercises.ts
View file @
7461a249
...
...
@@ -164,6 +164,7 @@ export class Answer {
*/
moveIn
(
sX
,
sY
,
toX
,
toY
,
callback
=
null
)
{
console
.
log
(
'
answer move in
'
);
if
(
this
.
contentType
==
'
T
'
)
{
this
.
bg
.
x
=
toX
;
this
.
bg
.
y
=
toY
;
...
...
@@ -187,6 +188,9 @@ export class Answer {
* @param callback
*/
moveOut
(
toX
,
toY
,
callback
=
null
)
{
console
.
log
(
'
answer moveOut
'
);
if
(
this
.
contentType
==
'
T
'
)
{
this
.
bg
.
x
=
toX
;
this
.
bg
.
y
=
toY
;
...
...
@@ -197,7 +201,7 @@ export class Answer {
this
.
bg
.
x
=
toX
;
this
.
bg
.
y
=
toY
;
tweenChange
(
this
.
contentSprite
,
{
alpha
:
0
},
0.3
,
callback
);
tweenChange
(
this
.
contentSprite
,
{
alpha
:
0
},
0.3
,
callback
);
}
}
...
...
src/app/play/play.component.ts
View file @
7461a249
...
...
@@ -928,6 +928,11 @@ export class PlayComponent implements OnInit, OnDestroy {
}
if
(
this
.
checkClickTarget
(
this
.
restartBtn
.
bg
))
{
if
(
this
.
restartBtn
.
curStatus
.
alpha
<
1
)
{
return
;
}
this
.
canTouch
=
false
;
this
.
restartBtn
.
click
(()
=>
{
...
...
@@ -1069,6 +1074,8 @@ export class PlayComponent implements OnInit, OnDestroy {
showGameOver
()
{
console
.
log
(
"
in showGameOver
"
);
this
.
canTouch
=
false
;
this
.
playAudio
(
'
win
'
);
...
...
@@ -1141,10 +1148,21 @@ export class PlayComponent implements OnInit, OnDestroy {
showCelebrate
();
});
//将答案滑出屏幕
this
.
leftBox
.
moveOut
();
this
.
midBox
.
moveOut
();
let
lastAnswer1
=
this
.
rightBox
.
answer
;
this
.
rightBox
.
hide
(
lastAnswer1
);
let
lastAnswer2
=
this
.
midBox
.
answer
;
this
.
midBox
.
hide
(
lastAnswer2
);
let
lastAnswer3
=
this
.
leftBox
.
answer
;
this
.
leftBox
.
hide
(
lastAnswer3
);
// this.leftBox.moveOut();
// this.midBox.moveOut();
this
.
rightBox
.
moveOut
();
//
this.rightBox.moveOut();
}
}
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