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
ec9f638f
Commit
ec9f638f
authored
Jul 27, 2021
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
d35d1112
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
25 deletions
+28
-25
play.component.ts
src/app/play/play.component.ts
+27
-22
resources.js
src/app/play/resources.js
+1
-3
sm_switch.mp3
src/assets/play/sound/sm_switch.mp3
+0
-0
No files found.
src/app/play/play.component.ts
View file @
ec9f638f
...
@@ -263,7 +263,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -263,7 +263,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
initTitle
()
{
initTitle
()
{
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
main-title
"
,
this
.
g_formData
.
title
.
mainText
,
"
Aileron-Black
"
,
"
#000000
"
,
76
,
(
w
,
h
)
=>
{
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
main-title
"
,
this
.
g_formData
.
title
.
mainText
,
"
Aileron-Black
"
,
"
#000000
"
,
88
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
160
*
this
.
g_mapScale
+
w
*
this
.
g_mapScale
/
2
,
x
:
160
*
this
.
g_mapScale
+
w
*
this
.
g_mapScale
/
2
,
y
:
65
*
this
.
g_mapScale
,
y
:
65
*
this
.
g_mapScale
,
...
@@ -345,7 +345,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -345,7 +345,7 @@ export class PlayComponent implements OnInit, OnDestroy {
btnPreShadow
.
ref
.
visible
=
status
;
btnPreShadow
.
ref
.
visible
=
status
;
}
}
let
labelIndex
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
question_index
"
,
""
,
"
Aileron-Bold
"
,
"
#3e9b31
"
,
48
,
(
w
,
h
)
=>
{
let
labelIndex
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
question_index
"
,
""
,
"
Aileron-Bold
"
,
"
#3e9b31
"
,
56
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
-
110
,
y
:
-
110
,
...
@@ -421,7 +421,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -421,7 +421,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
})
})
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`key_
${
letter
}
`
,
letter
,
"
Aileron-B
old
"
,
"
#3e9b31
"
,
72
,
(
w
,
h
)
=>
{
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`key_
${
letter
}
`
,
letter
,
"
Aileron-B
lack
"
,
"
#3e9b31
"
,
80
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
...
@@ -541,10 +541,10 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -541,10 +541,10 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
})
})
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`block_
${
questionIndex
}
_
${
li
}
_letter`
,
""
,
"
Aileron-B
old
"
,
"
#FFFFFF
"
,
72
,
(
w
,
h
)
=>
{
let
text
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
`block_
${
questionIndex
}
_
${
li
}
_letter`
,
""
,
"
Aileron-B
lack
"
,
"
#FFFFFF
"
,
76
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
2
,
}
}
})
})
...
@@ -942,7 +942,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -942,7 +942,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
})
bgMiddleMask
.
ref
.
addChild
(
checkTop
.
ref
)
bgMiddleMask
.
ref
.
addChild
(
checkTop
.
ref
)
let
labelText
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
Chenck_label_title
"
,
"
Check
"
,
"
Aileron-Bold
"
,
"
#FFFFFF
"
,
52
)
let
labelText
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
Chenck_label_title
"
,
"
Check
"
,
"
Aileron-Bold
"
,
"
#FFFFFF
"
,
60
)
checkTop
.
ref
.
addChild
(
labelText
.
ref
);
checkTop
.
ref
.
addChild
(
labelText
.
ref
);
let
checkBottom
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`checkpannel_checnk_bottom`
,
"
check_bottom
"
,
(
w
,
h
)
=>
{
let
checkBottom
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`checkpannel_checnk_bottom`
,
"
check_bottom
"
,
(
w
,
h
)
=>
{
...
@@ -966,7 +966,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -966,7 +966,7 @@ export class PlayComponent implements OnInit, OnDestroy {
},
(
w
,
h
)
=>
{
},
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
2
5
0
y
:
2
0
0
}
}
})
})
...
@@ -1278,11 +1278,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1278,11 +1278,11 @@ export class PlayComponent implements OnInit, OnDestroy {
scrollContent
.
ref
.
addChild
(
text
.
ref
)
scrollContent
.
ref
.
addChild
(
text
.
ref
)
let
wordColorBG
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
eeeeee
"
,
360
,
64
,
data
.
right
?
"
#007b3e
"
:
"
#d71818
"
);
let
wordColorBG
=
this
.
g_cartoon
.
createCartoonElementShapeRect
(
"
eeeeee
"
,
360
,
64
,
data
.
right
?
"
#007b3e
"
:
"
#d71818
"
);
wordColorBG
.
ref
.
radius
=
1
0
wordColorBG
.
ref
.
radius
=
1
6
wordColorBG
.
ref
.
y
=
totalHeight
+
padding
+
64
/
2
wordColorBG
.
ref
.
y
=
totalHeight
+
padding
+
64
/
2
totalHeight
+=
padding
+
64
;
totalHeight
+=
padding
+
64
;
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
word
,
"
DroidSansFallback
"
,
"
#FFFFFF
"
,
44
)
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
word
,
"
Aileron-Black
"
,
"
#FFFFFF
"
,
48
)
word
.
ref
.
x
=
360
/
2
word
.
ref
.
x
=
360
/
2
word
.
ref
.
y
=
64
/
2
+
5
word
.
ref
.
y
=
64
/
2
+
5
wordColorBG
.
ref
.
addChild
(
word
.
ref
);
wordColorBG
.
ref
.
addChild
(
word
.
ref
);
...
@@ -1302,7 +1302,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1302,7 +1302,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
})
totalHeight
+=
120
+
padding
;
totalHeight
+=
120
+
padding
;
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
rightWord
,
"
DroidSansFallback
"
,
"
#ffe9b1
"
,
44
)
let
word
=
this
.
g_cartoon
.
createCartoonElementLabel
(
"
text-label
"
,
data
.
rightWord
,
"
Aileron-Black
"
,
"
#ffe9b1
"
,
52
)
word
.
ref
.
x
=
0
word
.
ref
.
x
=
0
word
.
ref
.
y
=
0
word
.
ref
.
y
=
0
ele
.
ref
.
addChild
(
word
.
ref
)
ele
.
ref
.
addChild
(
word
.
ref
)
...
@@ -1373,7 +1373,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1373,7 +1373,7 @@ export class PlayComponent implements OnInit, OnDestroy {
submitActive
.
ref
.
alpha
=
0
;
submitActive
.
ref
.
alpha
=
0
;
submit
.
ref
.
addChild
(
submitActive
.
ref
)
submit
.
ref
.
addChild
(
submitActive
.
ref
)
let
textSubmit
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
button_submit_text
"
,
"
Submit
"
,
"
Aileron-Black
"
,
"
#FFFFFF
"
,
64
,
(
w
,
h
)
=>
{
let
textSubmit
=
this
.
g_cartoon
.
createCartoonElementLabelFunc
(
"
button_submit_text
"
,
"
Submit
"
,
"
Aileron-Black
"
,
"
#FFFFFF
"
,
76
,
(
w
,
h
)
=>
{
return
{
return
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
...
@@ -1381,16 +1381,6 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1381,16 +1381,6 @@ export class PlayComponent implements OnInit, OnDestroy {
})
})
submit
.
ref
.
addChild
(
textSubmit
.
ref
)
submit
.
ref
.
addChild
(
textSubmit
.
ref
)
submit
.
switchActive
=
(
status
)
=>
{
if
(
status
)
{
submitActive
.
ref
.
alpha
=
1
;
// this.m_canInput = false;
}
else
{
submitActive
.
ref
.
alpha
=
0
;
// this.m_canInput = true;
}
}
let
btnSubmitShadow
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
"
btn_submit_shadow
"
,
"
btn_submit_shadow
"
,
(
w
,
h
)
=>
{
let
btnSubmitShadow
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
"
btn_submit_shadow
"
,
"
btn_submit_shadow
"
,
(
w
,
h
)
=>
{
return
{
return
{
sx
:
941
*
this
.
g_mapScale
/
w
,
sx
:
941
*
this
.
g_mapScale
/
w
,
...
@@ -1403,7 +1393,21 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1403,7 +1393,21 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
})
})
submit
.
switchActive
=
(
status
)
=>
{
if
(
status
)
{
submitActive
.
ref
.
alpha
=
1
;
btnSubmitShadow
.
ref
.
alpha
=
1
;
textSubmit
.
ref
.
fontColor
=
"
#FFFFFF
"
// this.m_canInput = false;
}
else
{
submitActive
.
ref
.
alpha
=
0
;
btnSubmitShadow
.
ref
.
alpha
=
0
;
textSubmit
.
ref
.
fontColor
=
"
#f1e4c2
"
// this.m_canInput = true;
}
}
submit
.
switchActive
(
false
)
submit
.
out
=
(
callback
)
=>
{
submit
.
out
=
(
callback
)
=>
{
btnSubmitShadow
.
ref
.
visible
=
false
;
btnSubmitShadow
.
ref
.
visible
=
false
;
return
tweenChange
(
submit
.
ref
,
{
y
:
this
.
g_canvasHeight
+
200
},
0.3
,
()
=>
{
return
tweenChange
(
submit
.
ref
,
{
y
:
this
.
g_canvasHeight
+
200
},
0.3
,
()
=>
{
...
@@ -1489,6 +1493,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1489,6 +1493,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 切换题目,主要是变蓝/变红输入框
// 切换题目,主要是变蓝/变红输入框
switchQuestion
(
fromIndex
,
toIndex
)
{
switchQuestion
(
fromIndex
,
toIndex
)
{
this
.
g_cartoon
.
pauseAudio
(
"
sm_switch
"
)
if
(
toIndex
.
toString
().
indexOf
(
"
-
"
)
!=
-
1
)
{
if
(
toIndex
.
toString
().
indexOf
(
"
-
"
)
!=
-
1
)
{
let
indexArr
=
toIndex
.
split
(
"
-
"
)
let
indexArr
=
toIndex
.
split
(
"
-
"
)
fromIndex
=
indexArr
[
0
]
fromIndex
=
indexArr
[
0
]
...
...
src/app/play/resources.js
View file @
ec9f638f
...
@@ -92,9 +92,7 @@ const localAudios = {
...
@@ -92,9 +92,7 @@ const localAudios = {
'
sm-go
'
:
'
assets/default/audio/sm-go.mp3
'
,
'
sm-go
'
:
'
assets/default/audio/sm-go.mp3
'
,
'
sm-ready
'
:
'
assets/default/audio/sm-ready.mp3
'
,
'
sm-ready
'
:
'
assets/default/audio/sm-ready.mp3
'
,
'
button
'
:
'
assets/play/sound/button.mp3
'
,
'
sm_switch
'
:
'
assets/play/sound/sm_switch.mp3
'
'
popup
'
:
'
assets/play/sound/popup.mp3
'
,
'
correct
'
:
'
assets/play/sound/correct.mp3
'
,
};
};
const
multiSizeBackground
=
{
const
multiSizeBackground
=
{
...
...
src/assets/play/sound/sm_switch.mp3
0 → 100644
View file @
ec9f638f
File added
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