Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PU-11
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-11
Commits
5f5484c6
Commit
5f5484c6
authored
Apr 16, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 标题坐标修正
parent
80dd0ae1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
Stage.ts
src/app/play/Stage.ts
+16
-20
play.component.ts
src/app/play/play.component.ts
+1
-1
No files found.
src/app/play/Stage.ts
View file @
5f5484c6
...
...
@@ -240,8 +240,8 @@ export class Stage extends Item {
title
.
y
=
this
.
titleBg
.
height
/
2
;
this
.
titleBg
.
addChild
(
title
);
title
.
scaleY
=
Math
.
min
(
1
,
2
3
0
/
title
.
height
);
title
.
scaleX
=
Math
.
min
(
1
,
2
3
0
/
title
.
height
);
title
.
scaleY
=
Math
.
min
(
1
,
2
1
0
/
title
.
height
);
title
.
scaleX
=
Math
.
min
(
1
,
2
1
0
/
title
.
height
);
this
.
curTitleLabel
=
title
;
}
...
...
@@ -281,26 +281,24 @@ export class Mission extends Item {
const
bg
=
new
ShapeRect
();
bg
.
setSize
(
this
.
width
,
this
.
height
);
bg
.
scaleX
=
this
.
scaleX
;
bg
.
scaleY
=
this
.
scaleY
;
bg
.
alpha
=
0
;
this
.
bg
=
bg
;
const
missionPic
=
new
MySprite
();
missionPic
.
init
(
this
.
images
.
get
(
theme
+
"
e-mission
"
));
missionPic
.
x
=
missionPic
.
width
/
2
;
missionPic
.
y
=
this
.
height
/
2
;
bg
.
addChild
(
missionPic
,
2
);
const
stageBgPic
=
new
MySprite
();
stageBgPic
.
init
(
this
.
images
.
get
(
theme
+
"
stage_bg
"
));
stageBgPic
.
scaleX
=
this
.
scaleX
*
2
;
stageBgPic
.
scaleY
=
this
.
scaleY
;
stageBgPic
.
alpha
=
0
;
stageBgPic
.
x
=
this
.
width
-
stageBgPic
.
getBoundingBox
().
width
/
2
+
5
*
this
.
scaleX
;
stageBgPic
.
y
=
this
.
height
-
stageBgPic
.
getBoundingBox
().
height
/
2
+
2
*
this
.
scaleY
;
stageBgPic
.
x
=
missionPic
.
width
+
stageBgPic
.
width
/
2
-
50
;
stageBgPic
.
y
=
this
.
height
/
2
;
this
.
stageBgPic
=
stageBgPic
;
bg
.
addChild
(
stageBgPic
);
const
missionPic
=
new
MySprite
();
missionPic
.
init
(
this
.
images
.
get
(
theme
+
"
e-mission
"
));
missionPic
.
scaleX
=
this
.
scaleX
;
missionPic
.
scaleY
=
this
.
scaleY
;
missionPic
.
x
=
missionPic
.
getBoundingBox
().
width
/
2
-
3
*
this
.
scaleX
;
missionPic
.
y
=
this
.
height
/
2
;
bg
.
addChild
(
missionPic
);
bg
.
addChild
(
stageBgPic
,
1
);
const
stageVal
=
new
Label
();
stageVal
.
text
=
""
;
...
...
@@ -308,14 +306,12 @@ export class Mission extends Item {
stageVal
.
fontColor
=
"
#ffffff
"
stageVal
.
fontSize
=
34
;
stageVal
.
textAlign
=
'
middle
'
;
stageVal
.
scaleX
=
this
.
scaleX
;
stageVal
.
scaleY
=
this
.
scaleY
;
stageVal
.
refreshSize
();
stageVal
.
x
=
missionPic
.
getBoundingBox
().
width
-
12
*
this
.
scaleX
;
stageVal
.
y
=
20
*
this
.
scaleY
+
stageVal
.
getBoundingBox
().
height
/
2
;
stageVal
.
x
=
-
stageBgPic
.
width
/
4
;
stageVal
.
y
=
-
5
;
stageVal
.
alpha
=
0
;
bg
.
addChild
(
stageVal
);
stageBgPic
.
addChild
(
stageVal
);
this
.
stageValLabel
=
stageVal
;
}
...
...
src/app/play/play.component.ts
View file @
5f5484c6
...
...
@@ -593,7 +593,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
mission
=
new
Mission
(
this
.
images
,
this
.
audioObj
,
this
.
mapScale
,
this
.
mapScale
);
mission
.
init
(
this
.
theme
);
mission
.
bg
.
x
=
-
50
*
this
.
mapScale
;
mission
.
bg
.
x
=
0
;
mission
.
bg
.
y
=
67
*
this
.
mapScale
;
this
.
renderArr
.
push
(
mission
.
bg
);
this
.
stage
.
mission
=
mission
;
...
...
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