Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L220
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-L220
Commits
ad0ce13a
Commit
ad0ce13a
authored
Mar 17, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
21ab0225
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
20 deletions
+51
-20
play.component.css
src/app/play/play.component.css
+6
-0
play.component.ts
src/app/play/play.component.ts
+45
-20
BRLNSDB_1.TTF
src/assets/font/BRLNSDB_1.TTF
+0
-0
No files found.
src/app/play/play.component.css
View file @
ad0ce13a
...
...
@@ -11,6 +11,12 @@
@font-face
{
font-family
:
'BRLNSDB_1'
;
src
:
url("../../assets/font/BRLNSDB_1.TTF")
;
}
@font-face
{
font-family
:
'BRLNSDB'
;
...
...
src/app/play/play.component.ts
View file @
ad0ce13a
...
...
@@ -58,6 +58,10 @@ export class PlayComponent implements OnInit, OnDestroy {
renderArr
;
prompt
;
prompt_val
;
//子弹渲染
bulletRenderArr
;
...
...
@@ -87,6 +91,8 @@ export class PlayComponent implements OnInit, OnDestroy {
weapon_fire_pic
//当前练习题答案:[{pic:spreat,correct:'',canHit:true|false,hited:true|false,show:true|false}]
curanswers
=
[]
...
...
@@ -804,6 +810,33 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initTopPart
();
this
.
initPrompt
();
}
initPrompt
(){
//显示练习题剩余提示
const
prompt
=
new
MySprite
();
prompt
.
init
(
this
.
images
.
get
(
'
prompt
'
));
prompt
.
setScaleXY
(
this
.
mapScale
);
prompt
.
y
=
-
prompt
.
height
;
prompt
.
x
=
-
prompt
.
width
;
this
.
prompt
=
prompt
;
let
prompt_val
=
new
Label
();
prompt_val
.
text
=
""
;
prompt_val
.
textAlign
=
'
middle
'
;
prompt_val
.
fontSize
=
100
;
prompt_val
.
fontName
=
"
BRLNSDB_1
"
;
prompt_val
.
fontColor
=
"
#FFFFFF
"
;
prompt_val
.
refreshSize
();
prompt_val
.
x
=
-
prompt_val
.
width
/
2
;
prompt_val
.
y
=
0
;
prompt
.
addChild
(
prompt_val
);
this
.
prompt_val
=
prompt_val
;
prompt
.
childDepandAlpha
=
true
;
}
initTopPart
()
{
...
...
@@ -844,6 +877,8 @@ export class PlayComponent implements OnInit, OnDestroy {
initPic
()
{
const
maxW
=
this
.
canvasWidth
;
const
bg_pic
=
new
MySprite
();
...
...
@@ -1444,7 +1479,8 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout
(()
=>
{
tweenChange
(
cover
,
{
alpha
:
0
},
6
,
()
=>
{
this
.
prompt
.
x
=
-
(
this
.
prompt
.
width
+
100
);
this
.
prompt
.
y
=
-
this
.
prompt
.
height
-
100
;
this
.
initPracticePic
();
});
},
6000
);
...
...
@@ -1459,27 +1495,16 @@ export class PlayComponent implements OnInit, OnDestroy {
* 显示练习题结束提示
*/
showPrompt
(){
//显示练习题剩余提示
const
prompt
=
new
MySprite
();
prompt
.
init
(
this
.
images
.
get
(
'
prompt
'
));
prompt
.
setScaleXY
(
this
.
mapScale
);
prompt
.
y
=
this
.
canvasHeight
/
2
;
prompt
.
x
=
this
.
canvasWidth
/
2
;
this
.
endPageArr
.
push
(
prompt
);
let
prompt_val
=
new
Label
();
prompt_val
.
text
=
(
this
.
nextPracticeIndex
+
1
)
+
"
/
"
+
this
.
data
.
practices
.
length
;
prompt_val
.
textAlign
=
'
middle
'
;
prompt_val
.
fontSize
=
100
;
prompt_val
.
fontName
=
"
BRLNSDB
"
;
prompt_val
.
fontColor
=
"
#FFFFFF
"
;
prompt_val
.
refreshSize
();
//显示练习题剩余提示
this
.
prompt
.
y
=
this
.
canvasHeight
/
2
;
this
.
prompt
.
x
=
this
.
canvasWidth
/
2
;
this
.
endPageArr
.
push
(
this
.
prompt
);
prompt_val
.
x
=
-
prompt_val
.
width
/
2
;
prompt_val
.
y
=
0
;
prompt
.
addChild
(
prompt_val
);
prompt
.
childDepandAlpha
=
true
;
this
.
prompt_val
.
text
=
(
this
.
nextPracticeIndex
+
1
)
+
"
/
"
+
this
.
data
.
practices
.
length
;
this
.
prompt_val
.
refreshSize
();
this
.
prompt_val
.
x
=
-
this
.
prompt_val
.
getBoundingBox
().
width
/
2
;
}
/**
...
...
src/assets/font/BRLNSDB_1.TTF
0 → 100644
View file @
ad0ce13a
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