Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PU-17
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
PU-17
Commits
20cd3065
Commit
20cd3065
authored
Jun 30, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
810ae243
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
Palette2.ts
src/app/play/Palette2.ts
+1
-5
Stage.ts
src/app/play/Stage.ts
+9
-3
play.component.ts
src/app/play/play.component.ts
+3
-3
No files found.
src/app/play/Palette2.ts
View file @
20cd3065
...
...
@@ -136,11 +136,7 @@ export class ColorCard extends Item {
}
click
(
callback
=
null
)
{
this
.
touched
=
true
;
this
.
lightPic
.
alpha
=
1
;
if
(
callback
)
{
callback
();
}
this
.
touch
(
callback
);
}
touch
(
callback
=
null
)
{
...
...
src/app/play/Stage.ts
View file @
20cd3065
...
...
@@ -301,6 +301,7 @@ export class Card extends Item {
}
checkRight
(
colorCode
,
color
,
callback
=
null
,
errCallback
=
null
)
{
console
.
log
(
colorCode
,
color
);
if
(
!
colorCode
)
{
this
.
showErr
(
errCallback
);
return
false
;
...
...
@@ -317,10 +318,15 @@ export class Card extends Item {
}
private
showErr
(
callback
=
null
)
{
this
.
cardLight
.
alpha
=
0
;
this
.
clearColor
();
this
.
cardLight
.
alpha
=
1
;
playAudio
(
this
.
audioObj
[
'
wrong
'
]);
shake2
(
this
.
bg
,
1
,
callback
);
shake2
(
this
.
bg
,
1
,
()
=>
{
this
.
clearColor
();
if
(
callback
){
callback
();
}
});
}
private
showRight
(
color
,
callback
=
null
)
{
...
...
src/app/play/play.component.ts
View file @
20cd3065
...
...
@@ -776,9 +776,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
this
.
checkClickTarget
(
colorCard
.
bg
))
{
if
(
this
.
curCard
)
{
if
(
this
.
curCard
&&
!
this
.
curCard
.
answered
)
{
this
.
canTouch
=
false
;
this
.
curCard
.
fillColor
(
colorCard
.
color
);
this
.
curCard
.
checkRight
(
colorCard
.
code
,
colorCard
.
color
,
()
=>
{
...
...
@@ -842,7 +842,7 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
}
else
{
if
(
this
.
curCard
)
{
if
(
this
.
curCard
&&
!
this
.
curCard
.
answered
)
{
this
.
curCard
.
clearColor
();
}
}
...
...
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