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
d3e1b869
Commit
d3e1b869
authored
Apr 02, 2020
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c6da07f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
MapSkin.exml
egret/resource/skins/MapSkin.exml
+1
-1
CountDown.ts
egret/src/mapScene/CountDown.ts
+10
-9
home.json
mock/happyclear/home.json
+2
-1
No files found.
egret/resource/skins/MapSkin.exml
View file @
d3e1b869
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
id=
"countdown"
text=
"00:00:00"
verticalAlign=
"middle"
textAlign=
"center"
size=
"
20
"
fontFamily=
"FZY4JW"
anchorOffsetX=
"0"
width=
"87"
anchorOffsetY=
"0"
height=
"37"
strokeColor=
"0x4365ac"
stroke=
"2"
verticalCenter=
"0.5"
horizontalCenter=
"-84.25"
/>
<e:Label
id=
"countdown"
text=
"00:00:00"
verticalAlign=
"middle"
textAlign=
"center"
size=
"
19
"
fontFamily=
"FZY4JW"
anchorOffsetX=
"0"
width=
"87"
anchorOffsetY=
"0"
height=
"37"
strokeColor=
"0x4365ac"
stroke=
"2"
verticalCenter=
"0.5"
horizontalCenter=
"-84.25"
/>
</e:Group>
</e:Group>
<e:Button
id=
"shopBtn"
label=
""
x=
"613.08"
y=
"174.01"
visible=
"false"
>
<e:Button
id=
"shopBtn"
label=
""
x=
"613.08"
y=
"174.01"
visible=
"false"
>
<e:skinName>
<e:skinName>
...
...
egret/src/mapScene/CountDown.ts
View file @
d3e1b869
...
@@ -2,8 +2,9 @@ export default class CountDown extends egret.EventDispatcher {
...
@@ -2,8 +2,9 @@ export default class CountDown extends egret.EventDispatcher {
_txt
:
eui
.
Label
;
_txt
:
eui
.
Label
;
_timer
:
egret
.
Timer
;
_timer
:
egret
.
Timer
;
_func
;
_func
;
_addspace
:
boolean
=
false
;
_addspace
:
boolean
=
false
;
constructor
(
txt
?,
func
?,
addspace
=
false
)
{
constructor
(
txt
?,
func
?,
addspace
=
false
)
{
super
();
super
();
this
.
_txt
=
txt
;
this
.
_txt
=
txt
;
this
.
_func
=
func
;
this
.
_func
=
func
;
...
@@ -24,15 +25,15 @@ export default class CountDown extends egret.EventDispatcher {
...
@@ -24,15 +25,15 @@ export default class CountDown extends egret.EventDispatcher {
updateTxt
()
{
updateTxt
()
{
if
(
!
this
.
_txt
)
return
;
if
(
!
this
.
_txt
)
return
;
const
left
=
this
.
_timer
.
repeatCount
-
this
.
_timer
.
currentCount
;
const
left
=
this
.
_timer
.
repeatCount
-
this
.
_timer
.
currentCount
;
const
h
=
Math
.
floor
(
left
/
3600
);
const
h
=
Math
.
floor
(
left
/
3600
);
const
m
=
Math
.
floor
(
(
left
%
3600
)
/
60
);
const
m
=
Math
.
floor
((
left
%
3600
)
/
60
);
const
s
=
left
%
3600
%
60
;
const
s
=
left
%
3600
%
60
;
if
(
this
.
_addspace
){
if
(
this
.
_addspace
)
{
this
.
_txt
.
text
=
`
${
this
.
getNumber
(
h
)}
:
${
this
.
getNumber
(
m
)}
:
${
this
.
getNumber
(
s
)}
`
;
this
.
_txt
.
text
=
`
${
this
.
getNumber
(
h
)}
:
${
this
.
getNumber
(
m
)}
:
${
this
.
getNumber
(
s
)}
`
;
}
else
{
}
else
{
this
.
_txt
.
text
=
`
${
this
.
getNumber
(
h
)}
:
${
this
.
getNumber
(
m
)}
:
${
this
.
getNumber
(
s
)}
`
;
this
.
_txt
.
text
=
`
${
this
.
getNumber
(
h
)}
:
${
this
.
getNumber
(
m
)}
:
${
this
.
getNumber
(
s
)}
`
;
}
}
if
(
this
.
_func
)
{
if
(
this
.
_func
)
{
this
.
_txt
.
text
=
this
.
_func
(
this
.
_txt
.
text
);
this
.
_txt
.
text
=
this
.
_func
(
this
.
_txt
.
text
);
}
}
...
@@ -50,8 +51,8 @@ export default class CountDown extends egret.EventDispatcher {
...
@@ -50,8 +51,8 @@ export default class CountDown extends egret.EventDispatcher {
this
.
_timer
.
stop
();
this
.
_timer
.
stop
();
this
.
_timer
.
repeatCount
=
repeatCount
;
this
.
_timer
.
repeatCount
=
repeatCount
;
this
.
_timer
.
reset
();
this
.
_timer
.
reset
();
if
(
repeatCount
>
0
)
if
(
repeatCount
>
0
)
this
.
_timer
.
start
();
this
.
_timer
.
start
();
this
.
updateTxt
();
this
.
updateTxt
();
}
}
}
}
\ No newline at end of file
mock/happyclear/home.json
View file @
d3e1b869
...
@@ -3029,8 +3029,9 @@
...
@@ -3029,8 +3029,9 @@
"num"
:
3
"num"
:
3
}
}
],
],
"remainEnargy"
:
99
,
"remainEnargy"
:
0
,
"askForEnergy"
:
false
,
"askForEnergy"
:
false
,
"refectionCountdown"
:
77777
,
"canReceiveTreasureBoxNum"
:
10
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
150
"nextRangeStarsNum"
:
150
}
}
...
...
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