Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L223
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-L223
Commits
4b9e5567
Commit
4b9e5567
authored
Apr 08, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
13ca26c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
play.component.ts
src/app/play/play.component.ts
+11
-19
No files found.
src/app/play/play.component.ts
View file @
4b9e5567
...
...
@@ -846,7 +846,7 @@ export class PlayComponent implements OnInit, OnDestroy {
lotusLeaf
.
init
(
this
.
images
.
get
(
"
b_lotus_leaf
"
));
lotusLeaf
.
x
=
this
.
canvasWidth
+
lotusLeaf
.
getBoundingBox
().
width
/
2
;
lotusLeaf
.
y
=
this
.
canvasHeight
+
lotusLeaf
.
getBoundingBox
().
height
/
2
;
this
.
renderArr
.
push
(
lotusLeaf
);
this
.
bigLotusLeaf
.
lotusLeaf
=
lotusLeaf
;
let
initX
=
this
.
canvasWidth
-
lotusLeaf
.
getBoundingBox
().
width
/
2
-
150
*
this
.
mapScale
;
...
...
@@ -856,7 +856,7 @@ export class PlayComponent implements OnInit, OnDestroy {
//水波
const
leafWave
=
new
MySprite
();
leafWave
.
setScaleXY
(
this
.
mapScale
);
leafWave
.
setScaleXY
(
this
.
mapScale
*
0.6
);
leafWave
.
init
(
this
.
images
.
get
(
"
b_leaf_wave
"
));
leafWave
.
x
=
initX
;
leafWave
.
y
=
initY
;
...
...
@@ -864,6 +864,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
renderArr
.
push
(
leafWave
);
this
.
bigLotusLeaf
.
leafWave
=
leafWave
;
//影子
const
shadow
=
new
MySprite
();
shadow
.
setScaleXY
(
this
.
mapScale
);
...
...
@@ -873,6 +875,9 @@ export class PlayComponent implements OnInit, OnDestroy {
shadow
.
visible
=
false
;
this
.
renderArr
.
push
(
shadow
);
this
.
bigLotusLeaf
.
shadow
=
shadow
;
//添加荷叶到渲染数组
this
.
renderArr
.
push
(
lotusLeaf
);
}
...
...
@@ -1097,10 +1102,12 @@ export class PlayComponent implements OnInit, OnDestroy {
content_val
.
textAlign
=
'
middle
'
;
content_val
.
fontSize
=
120
;
content_val
.
fontName
=
"
BRLNSDB
"
;
content_val
.
fontColor
=
"
#
006400
"
;
content_val
.
fontColor
=
"
#
FFFFFF
"
;
content_val
.
alpha
=
0
;
content_val
.
refreshSize
();
content_val
.
setOutline
(
5
,
"
#006400
"
);
setFontSize
(
parItem
.
height
-
40
*
this
.
mapScale
,
content_val
);
...
...
@@ -1109,21 +1116,6 @@ export class PlayComponent implements OnInit, OnDestroy {
content_val
.
x
=
-
content_val
.
getBoundingBox
().
width
/
2
;
content_val
.
y
=
-
20
*
this
.
mapScale
;
//字中字效果
{
let
content_val_2
=
new
Label
();
content_val_2
.
text
=
content
.
val
;
content_val_2
.
textAlign
=
'
middle
'
;
content_val_2
.
fontSize
=
content_val
.
fontSize
-
4
;
content_val_2
.
fontName
=
"
BRLNSDB
"
;
content_val_2
.
fontColor
=
"
#FFFFFF
"
;
content_val_2
.
alpha
=
0
;
content_val_2
.
refreshSize
();
content_val_2
.
x
=
(
content_val
.
getBoundingBox
().
width
-
content_val_2
.
getBoundingBox
().
width
)
/
2
;
//content_val_2.y = (content_val.getBoundingBox().height - content_val_2.getBoundingBox().height ) / 2;
content_val
.
addChild
(
content_val_2
);
content_val
.
childDepandAlpha
=
true
;
}
lotusLeafObj
.
conText
=
content_val
;
...
...
@@ -1678,7 +1670,7 @@ export class PlayComponent implements OnInit, OnDestroy {
tweenChange
(
this
.
bigLotusLeaf
.
leafWave
,
{
scaleX
:
scale
,
scaleY
:
scale
,
alpha
:
0
},
3
,
()
=>
{
//回到初始大小
this
.
bigLotusLeaf
.
leafWave
.
setScaleXY
(
this
.
mapScale
);
this
.
bigLotusLeaf
.
leafWave
.
setScaleXY
(
this
.
mapScale
*
0.6
);
//回到初始透明度
this
.
bigLotusLeaf
.
leafWave
.
alpha
=
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