Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_mb_03
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
dfzx_mb_03
Commits
ea7d06da
Commit
ea7d06da
authored
Oct 22, 2020
by
Li Mingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 手机版优化适配
parent
b60ce741
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
play.component.ts
src/app/play/play.component.ts
+16
-10
No files found.
src/app/play/play.component.ts
View file @
ea7d06da
...
@@ -825,13 +825,13 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -825,13 +825,13 @@ export class PlayComponent implements OnInit, OnDestroy {
let
prompt_val
=
new
Label
();
let
prompt_val
=
new
Label
();
prompt_val
.
text
=
""
;
prompt_val
.
text
=
""
;
prompt_val
.
textAlign
=
'
middle
'
;
prompt_val
.
textAlign
=
'
center
'
;
prompt_val
.
fontSize
=
100
;
prompt_val
.
fontSize
=
100
;
prompt_val
.
fontName
=
"
BRLNSDB_1
"
;
prompt_val
.
fontName
=
"
BRLNSDB_1
"
;
prompt_val
.
fontColor
=
"
#FFFFFF
"
;
prompt_val
.
fontColor
=
"
#FFFFFF
"
;
prompt_val
.
refreshSize
();
prompt_val
.
refreshSize
();
prompt_val
.
x
=
-
prompt_val
.
width
/
2
;
prompt_val
.
x
=
0
;
-
prompt_val
.
width
/
2
;
prompt_val
.
y
=
0
;
prompt_val
.
y
=
0
;
prompt
.
addChild
(
prompt_val
);
prompt
.
addChild
(
prompt_val
);
this
.
prompt_val
=
prompt_val
;
this
.
prompt_val
=
prompt_val
;
...
@@ -885,7 +885,13 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -885,7 +885,13 @@ export class PlayComponent implements OnInit, OnDestroy {
bg_pic
.
init
(
this
.
images
.
get
(
'
bg
'
));
bg_pic
.
init
(
this
.
images
.
get
(
'
bg
'
));
bg_pic
.
x
=
this
.
canvasWidth
/
2
;
bg_pic
.
x
=
this
.
canvasWidth
/
2
;
bg_pic
.
y
=
this
.
canvasHeight
/
2
;
bg_pic
.
y
=
this
.
canvasHeight
/
2
;
bg_pic
.
setScaleXY
(
maxW
/
bg_pic
.
width
);
const
sx
=
this
.
canvasWidth
/
bg_pic
.
width
;
const
sy
=
this
.
canvasHeight
/
bg_pic
.
height
;
const
s
=
Math
.
max
(
sx
,
sy
);
bg_pic
.
setScaleXY
(
s
);
// bg_pic.setScaleXY(maxW/bg_pic.width);
this
.
renderArr
.
push
(
bg_pic
);
this
.
renderArr
.
push
(
bg_pic
);
this
.
bg_pic
=
bg_pic
;
this
.
bg_pic
=
bg_pic
;
...
@@ -899,9 +905,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -899,9 +905,9 @@ export class PlayComponent implements OnInit, OnDestroy {
const
start_pic
=
new
MySprite
();
const
start_pic
=
new
MySprite
();
start_pic
.
init
(
this
.
images
.
get
(
'
start
'
));
start_pic
.
init
(
this
.
images
.
get
(
'
start
'
));
start_pic
.
x
=
this
.
canvasWidth
/
2
;
start_pic
.
y
=
this
.
canvasHeight
-
start_pic
.
height
/
2
;;
start_pic
.
setScaleXY
(
this
.
mapScale
);
start_pic
.
setScaleXY
(
this
.
mapScale
);
start_pic
.
x
=
this
.
canvasWidth
/
2
;
start_pic
.
y
=
this
.
canvasHeight
-
(
start_pic
.
height
/
2
-
30
)
*
start_pic
.
scaleY
;
this
.
renderArr
.
push
(
start_pic
);
this
.
renderArr
.
push
(
start_pic
);
this
.
startPic
=
start_pic
;
this
.
startPic
=
start_pic
;
...
@@ -1478,16 +1484,16 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1478,16 +1484,16 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
tweenChange
(
cover
,
{
alpha
:
0
},
6
,
()
=>
{
tweenChange
(
cover
,
{
alpha
:
0
},
2
,
()
=>
{
this
.
prompt
.
x
=
-
(
this
.
prompt
.
width
+
100
);
this
.
prompt
.
x
=
-
(
this
.
prompt
.
width
+
100
);
this
.
prompt
.
y
=
-
this
.
prompt
.
height
-
100
;
this
.
prompt
.
y
=
-
this
.
prompt
.
height
-
100
;
this
.
initPracticePic
();
this
.
initPracticePic
();
});
});
},
60
00
);
},
15
00
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
showPrompt
();
this
.
showPrompt
();
},
4
000
);
},
1
000
);
}
}
}
}
...
@@ -1504,7 +1510,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1504,7 +1510,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
prompt_val
.
text
=
(
this
.
nextPracticeIndex
+
1
)
+
"
/
"
+
this
.
data
.
practices
.
length
;
this
.
prompt_val
.
text
=
(
this
.
nextPracticeIndex
+
1
)
+
"
/
"
+
this
.
data
.
practices
.
length
;
this
.
prompt_val
.
refreshSize
();
this
.
prompt_val
.
refreshSize
();
this
.
prompt_val
.
x
=
-
this
.
prompt_val
.
getBoundingBox
().
width
/
2
;
//
this.prompt_val.x = -this.prompt_val.getBoundingBox().width/2;
}
}
/**
/**
...
@@ -1811,7 +1817,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1811,7 +1817,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
weapon_pic
.
alpha
=
0
;
this
.
weapon_pic
.
alpha
=
0
;
let
out
=
this
.
canvasHeight
-
this
.
restartPic
.
height
/
2
;
let
out
=
this
.
canvasHeight
-
(
this
.
restartPic
.
height
/
2
-
40
)
*
this
.
restartPic
.
scaleY
;
tweenChange
(
this
.
restartPic
,
{
y
:
out
},
1
,
()
=>
{
tweenChange
(
this
.
restartPic
,
{
y
:
out
},
1
,
()
=>
{
...
...
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