Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM04-3
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
JM04-3
Commits
270ada7a
Commit
270ada7a
authored
Jul 28, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
d2f3d3d4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
play.component.ts
src/app/play/play.component.ts
+12
-9
resources.js
src/app/play/resources.js
+5
-1
sm_checkin.mp3
src/assets/play/sound/sm_checkin.mp3
+0
-0
sm_moreinfo.mp3
src/assets/play/sound/sm_moreinfo.mp3
+0
-0
sm_submit.mp3
src/assets/play/sound/sm_submit.mp3
+0
-0
sm_switch.mp3
src/assets/play/sound/sm_switch.mp3
+0
-0
No files found.
src/app/play/play.component.ts
View file @
270ada7a
...
...
@@ -460,6 +460,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
g_enableMapDown
=
true
;
return
}
this
.
g_cartoon
.
playAudio
(
"
sm_switch
"
)
let
target
=
this
.
g_cartoon
.
getCartoonElement
(
this
.
m_currentInput
)
if
(
this
.
m_openShift
)
{
target
.
setContentText
(
letttes
[
i
-
1
].
toUpperCase
())
...
...
@@ -541,7 +542,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`block_
${
questionIndex
}
_
${
li
}
_letter`
,
""
,
"
Aileron-Black
"
,
"
#FFFFFF
"
,
76
,
(
w
,
h
)
=>
{
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`block_
${
questionIndex
}
_
${
li
}
_letter`
,
""
,
"
Aileron-Black
"
,
"
#FFFFFF
"
,
52
,
(
w
,
h
)
=>
{
return
{
x
:
0
,
y
:
2
,
...
...
@@ -809,7 +810,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
sX
=
-
1
*
width
/
2
+
width
/
colNum
/
2
let
sY
=
-
height
/
2
+
height
/
rolNum
/
2
let
step
=
(
width
/
colNum
)
<
(
height
/
rolNum
)?(
width
/
colNum
):(
height
/
rolNum
);
let
step
=
(
width
/
colNum
)
<
(
height
/
rolNum
)?(
width
/
colNum
):(
height
/
rolNum
)
+
8
;
this
.
m_blockGroup
=
new
Array
(
this
.
g_formData
.
dataArray
.
length
);
...
...
@@ -854,6 +855,7 @@ export class PlayComponent implements OnInit, OnDestroy {
element
.
ref
.
alpha
=
0
;
element
.
in
=
(
callback
)
=>
{
this
.
g_cartoon
.
playAudio
(
"
sm_checkin
"
);
return
tweenChange
(
element
.
ref
,
{
y
:
0
},
1
,
()
=>
{
callback
&&
callback
()
})
...
...
@@ -938,7 +940,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
bgMiddleMask
.
ref
.
addChild
(
checkTop
.
ref
)
let
labelText
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
Chenck_label_title
"
,
"
Check
"
,
"
Aileron-B
old
"
,
"
#FFFFFF
"
,
60
)
let
labelText
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
Chenck_label_title
"
,
"
Check
"
,
"
Aileron-B
lack
"
,
"
#FFFFFF
"
,
60
)
checkTop
.
ref
.
addChild
(
labelText
.
ref
);
let
checkBottom
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`checkpannel_checnk_bottom`
,
"
check_bottom
"
,
(
w
,
h
)
=>
{
...
...
@@ -966,7 +968,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
let
textSubmit
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
button_submit_text
"
,
"
更多练习
"
,
"
Aileron-B
lack
"
,
"
#FFFFFF
"
,
64
,
(
w
,
h
)
=>
{
let
textSubmit
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
button_submit_text
"
,
"
更多练习
"
,
"
Aileron-B
old
"
,
"
#FFFFFF
"
,
64
,
(
w
,
h
)
=>
{
return
{
x
:
0
,
y
:
0
,
...
...
@@ -990,6 +992,7 @@ export class PlayComponent implements OnInit, OnDestroy {
checkBottom
.
ref
.
addChild
(
btnMore
.
ref
)
this
.
subscribeMapDownEvent
(
btnMore
.
id
,
async
()
=>
{
this
.
g_cartoon
.
playAudio
(
"
sm_moreinfo
"
)
await
this
.
buttonPressAnimation
(
btnMore
.
id
,
btnMoreShadow
.
id
)
this
.
g_enableMapDown
=
true
;
})
...
...
@@ -1253,7 +1256,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
padding
=
30
;
let
scrollContent
=
this
.
g_cartoon
.
getCartoonElement
(
"
check_scroll_pannel
"
)
let
totalHeight
=
height
let
text
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text
"
,
data
.
text
,
"
DroidSansFallback
"
,
"
#FFFFFF
"
,
48
)
let
text
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text
"
,
data
.
text
,
"
Aileron-Bold
"
,
"
#FFFFFF
"
,
48
)
text
.
ref
.
textAlign
=
"
left
"
;
text
.
ref
.
warpLineHeight
=
64
;
text
.
ref
.
maxSingalLineWidth
=
800
;
...
...
@@ -1273,12 +1276,12 @@ export class PlayComponent implements OnInit, OnDestroy {
totalHeight
+=
(
text
.
ref
.
lineNum
+
1
)
*
64
;
scrollContent
.
ref
.
addChild
(
text
.
ref
)
let
wordColorBG
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
eeeeee
"
,
360
,
64
,
data
.
right
?
"
#007b3e
"
:
"
#d71818
"
);
let
wordColorBG
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
wordColorBG
"
,
360
,
64
,
data
.
right
?
"
#007b3e
"
:
"
#d71818
"
);
wordColorBG
.
ref
.
radius
=
16
wordColorBG
.
ref
.
y
=
totalHeight
+
padding
+
64
/
2
totalHeight
+=
padding
+
64
;
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
word
,
"
Aileron-B
lack
"
,
"
#FFFFFF
"
,
48
)
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
word
,
"
Aileron-B
old
"
,
"
#FFFFFF
"
,
48
)
word
.
ref
.
x
=
360
/
2
word
.
ref
.
y
=
64
/
2
+
5
wordColorBG
.
ref
.
addChild
(
word
.
ref
);
...
...
@@ -1298,7 +1301,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
totalHeight
+=
120
+
padding
;
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
rightWord
,
"
Aileron-B
lack
"
,
"
#ffe9b1
"
,
52
)
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
rightWord
,
"
Aileron-B
old
"
,
"
#ffe9b1
"
,
52
)
word
.
ref
.
x
=
0
word
.
ref
.
y
=
0
ele
.
ref
.
addChild
(
word
.
ref
)
...
...
@@ -1441,7 +1444,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
else
{
console
.
log
(
"
全部正确
"
)
}
this
.
g_cartoon
.
playAudio
(
"
sm_submit
"
)
this
.
m_blockGroup
.
forEach
(
group
=>
{
group
.
forEach
(
block
=>
{
block
.
modified
=
false
;
...
...
src/app/play/resources.js
View file @
270ada7a
...
...
@@ -92,7 +92,11 @@ const localAudios = {
'
sm-go
'
:
'
assets/default/audio/sm-go.mp3
'
,
'
sm-ready
'
:
'
assets/default/audio/sm-ready.mp3
'
,
'
sm_switch
'
:
'
assets/play/sound/sm_switch.mp3
'
'
sm_switch
'
:
'
assets/play/sound/sm_switch.mp3
'
,
'
sm_checkin
'
:
'
assets/play/sound/sm_checkin.mp3
'
,
'
sm_moreinfo
'
:
'
assets/play/sound/sm_moreinfo.mp3
'
,
'
sm_submit
'
:
'
assets/play/sound/sm_submit.mp3
'
};
const
multiSizeBackground
=
{
...
...
src/assets/play/sound/sm_checkin.mp3
0 → 100644
View file @
270ada7a
File added
src/assets/play/sound/sm_moreinfo.mp3
0 → 100644
View file @
270ada7a
File added
src/assets/play/sound/sm_submit.mp3
0 → 100644
View file @
270ada7a
File added
src/assets/play/sound/sm_switch.mp3
View file @
270ada7a
No preview for this file type
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