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
c360c475
Commit
c360c475
authored
Aug 26, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
5ef0d708
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
bonusTime.svga
egret/resource/assets/svgas/bonusTime.svga
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+23
-9
ScoreProgress.ts
egret/src/something/uis/ScoreProgress.ts
+3
-0
No files found.
egret/resource/assets/svgas/bonusTime.svga
0 → 100644
View file @
c360c475
File added
egret/src/mainScene/MainScene.ts
View file @
c360c475
...
...
@@ -199,7 +199,7 @@ export default class MainScene extends Scene {
Tool
.
init
();
//第几关
this
.
chapter
=
(
data
&&
data
.
chapter
)
?
data
.
chapter
:
1
;
// this.chapter =
33
;
// this.chapter =
25
;
this
.
chapterTxt
.
text
=
"第"
+
this
.
chapter
+
"关"
;
//关卡数据,1期定制,70,后面35关地图一致,步数减少
var
mapDataIndex
=
this
.
chapter
;
...
...
@@ -304,13 +304,15 @@ export default class MainScene extends Scene {
initSvgas
()
{
var
resPath
=
getResPath
()
var
parser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
]
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
,
"bonusTime"
]
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
parser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
y
=
500
;
if
(
svgas
[
i
]
!=
"bonusTime"
)
{
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
y
=
500
;
}
mv
.
stop
();
let
fun
;
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
...
...
@@ -1273,11 +1275,23 @@ export default class MainScene extends Scene {
//连消基数为1
this
.
commonContinuityTimes
=
1
;
this
.
effectContinuityTimes
=
1
;
this
.
addChild
(
this
.
bonusTime
);
this
.
bonusTime
.
play
(()
=>
{
this
.
removeChild
(
this
.
bonusTime
)
this
.
terminateSteps
();
})
if
(
this
.
movieClips
[
"bonusTime"
])
{
this
.
addChild
(
this
.
movieClips
[
"bonusTime"
])
this
.
movieClips
[
"bonusTime"
].
gotoAndPlay
(
1
,
true
)
setTimeout
(()
=>
{
this
.
terminateSteps
();
if
(
this
.
movieClips
[
"bonusTime"
].
parent
)
{
this
.
removeChild
(
this
.
movieClips
[
"bonusTime"
])
}
},
1930
)
}
else
{
this
.
addChild
(
this
.
bonusTime
);
this
.
bonusTime
.
play
(()
=>
{
this
.
removeChild
(
this
.
bonusTime
)
this
.
terminateSteps
();
})
}
return
}
//出累计一步分数的toast;
...
...
egret/src/something/uis/ScoreProgress.ts
View file @
c360c475
...
...
@@ -47,6 +47,8 @@ export class ScoreProgress {
w
=
(
663
-
595
)
*
scale
+
595
;
if
(
this
.
star3
.
source
!=
"lightedStar_png"
)
{
this
.
star3
.
source
=
"lightedStar_png"
;
this
.
star2
.
source
=
"lightedStar_png"
;
this
.
star1
.
source
=
"lightedStar_png"
;
this
.
starCount
=
3
;
};
}
...
...
@@ -56,6 +58,7 @@ export class ScoreProgress {
w
=
(
595
-
522
)
*
scale
+
522
;
if
(
this
.
star2
.
source
!=
"lightedStar_png"
)
{
this
.
star2
.
source
=
"lightedStar_png"
;
this
.
star1
.
source
=
"lightedStar_png"
;
this
.
starCount
=
2
;
};
}
...
...
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