Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wildfirecode13
xiaoxiaole
Commits
95864405
Commit
95864405
authored
May 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
引导遮罩调整
parent
2f0c1925
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
11 deletions
+33
-11
MainScene.ts
egret/src/mainScene/MainScene.ts
+6
-2
ScoreProgress.ts
egret/src/something/uis/ScoreProgress.ts
+27
-9
No files found.
egret/src/mainScene/MainScene.ts
View file @
95864405
...
@@ -525,8 +525,8 @@ export default class MainScene extends Scene {
...
@@ -525,8 +525,8 @@ export default class MainScene extends Scene {
//重置基础元素类型及特效
//重置基础元素类型及特效
this
.
initBaseElement
();
this
.
initBaseElement
();
//设置栏置顶
//设置栏置顶
this
.
addChild
(
this
[
"settingAll"
])
//
this.addChild(this["settingAll"])
this
.
addChild
(
this
[
'redrainbg'
]);
//
this.addChild(this['redrainbg']);
this
[
'redrainbg'
].
visible
=
false
;
this
[
'redrainbg'
].
visible
=
false
;
this
.
settingGroup
.
visible
=
false
;
this
.
settingGroup
.
visible
=
false
;
this
.
addLoading
();
this
.
addLoading
();
...
@@ -893,6 +893,7 @@ export default class MainScene extends Scene {
...
@@ -893,6 +893,7 @@ export default class MainScene extends Scene {
//分数进度条,托管
//分数进度条,托管
this
.
scoreProgress
=
new
ScoreProgress
(
this
.
starProgress
,
this
.
curScoreNum
,
this
.
chapterData
.
starScores
);
this
.
scoreProgress
=
new
ScoreProgress
(
this
.
starProgress
,
this
.
curScoreNum
,
this
.
chapterData
.
starScores
);
//分数置0
//分数置0
this
.
score
=
0
;
this
.
score
=
0
;
//地图生成
//地图生成
...
@@ -5406,6 +5407,9 @@ export default class MainScene extends Scene {
...
@@ -5406,6 +5407,9 @@ export default class MainScene extends Scene {
Pool
.
recover
(
RecoverName
.
LATTICE
,
ilattice
);
Pool
.
recover
(
RecoverName
.
LATTICE
,
ilattice
);
}
}
}
}
if
(
this
.
scoreProgress
){
this
.
scoreProgress
.
removeStarProgress
();
}
}
}
recoverMapast
(
lat
:
Lattice
){
recoverMapast
(
lat
:
Lattice
){
if
(
lat
.
ice
&&
lat
.
ice
.
parent
){
if
(
lat
.
ice
&&
lat
.
ice
.
parent
){
...
...
egret/src/something/uis/ScoreProgress.ts
View file @
95864405
...
@@ -11,6 +11,7 @@ export class ScoreProgress {
...
@@ -11,6 +11,7 @@ export class ScoreProgress {
*/
*/
starScores
:
number
[];
starScores
:
number
[];
mask
:
egret
.
Shape
;
star1
:
eui
.
Image
;
star1
:
eui
.
Image
;
star2
:
eui
.
Image
;
star2
:
eui
.
Image
;
star3
:
eui
.
Image
;
star3
:
eui
.
Image
;
...
@@ -97,29 +98,46 @@ export class ScoreProgress {
...
@@ -97,29 +98,46 @@ export class ScoreProgress {
this
.
allScore
=
640
/
563
*
this
.
starScores
[
2
];
this
.
allScore
=
640
/
563
*
this
.
starScores
[
2
];
//加遮罩,加到starProgress的父级中
//加遮罩,加到starProgress的父级中
var
p
=
starProgress
.
parent
;
var
p
=
starProgress
.
parent
;
var
mask
=
new
egret
.
Shape
();
var
pchildidx
=
p
.
getChildIndex
(
starProgress
);
this
.
mask
=
new
egret
.
Shape
();
// window['aaa'] = mask;
// window['aaa'] = mask;
mask
.
graphics
.
beginFill
(
0xff0000
,
1
);
this
.
mask
.
graphics
.
beginFill
(
0xff0000
,
1
);
mask
.
graphics
.
drawRoundRect
(
138
,
151.5
,
0
,
41
,
50
);
this
.
mask
.
graphics
.
drawRoundRect
(
138
,
151.5
,
0
,
41
,
50
);
mask
.
graphics
.
endFill
();
this
.
mask
.
graphics
.
endFill
();
this
.
starProgress
.
mask
=
mask
;
this
.
starProgress
.
mask
=
this
.
mask
;
p
.
addChild
(
mask
);
p
.
addChild
At
(
this
.
mask
,
pchildidx
+
1
);
//星星1 lightedStar_png
//星星1 lightedStar_png
var
textureStar
=
RES
.
getRes
(
"unlightedStar_png"
);
var
textureStar
=
RES
.
getRes
(
"unlightedStar_png"
);
this
.
star1
=
new
eui
.
Image
(
textureStar
);
// width (27 * 2)
this
.
star1
=
new
eui
.
Image
(
textureStar
);
// width (27 * 2)
this
.
star1
.
x
=
383
;
// 410
this
.
star1
.
x
=
383
;
// 410
this
.
star1
.
y
=
153.5
;
// 201
this
.
star1
.
y
=
153.5
;
// 201
p
.
addChild
(
this
.
star1
);
p
.
addChild
At
(
this
.
star1
,
pchildidx
+
2
);
this
.
star2
=
new
eui
.
Image
(
textureStar
);
this
.
star2
=
new
eui
.
Image
(
textureStar
);
this
.
star2
.
x
=
469
;
// 496
this
.
star2
.
x
=
469
;
// 496
this
.
star2
.
y
=
153.5
;
this
.
star2
.
y
=
153.5
;
p
.
addChild
(
this
.
star2
);
p
.
addChild
At
(
this
.
star2
,
pchildidx
+
3
);
this
.
star3
=
new
eui
.
Image
(
textureStar
);
this
.
star3
=
new
eui
.
Image
(
textureStar
);
this
.
star3
.
x
=
556
;
// 583
this
.
star3
.
x
=
556
;
// 583
this
.
star3
.
y
=
153.5
;
this
.
star3
.
y
=
153.5
;
p
.
addChild
(
this
.
star3
);
p
.
addChildAt
(
this
.
star3
,
pchildidx
+
4
);
}
removeStarProgress
(){
var
p
=
this
.
starProgress
.
parent
;
if
(
this
.
mask
.
parent
){
this
.
mask
.
parent
.
removeChild
(
this
.
mask
);
this
.
starProgress
.
mask
=
null
;
}
if
(
this
.
star1
.
parent
){
this
.
star1
.
parent
.
removeChild
(
this
.
star1
);
}
if
(
this
.
star2
.
parent
){
this
.
star2
.
parent
.
removeChild
(
this
.
star2
);
}
if
(
this
.
star3
.
parent
){
this
.
star3
.
parent
.
removeChild
(
this
.
star3
);
}
}
}
}
}
\ No newline at end of file
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