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
9a85a188
Commit
9a85a188
authored
Sep 24, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
10ce2672
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
41 deletions
+49
-41
blood2.tmproject
egret/resource/TextureMerger/blood2.tmproject
+1
-1
sign.tmproject
egret/resource/TextureMerger/sign.tmproject
+1
-0
default.res.json
egret/resource/default.res.json
+11
-15
default.thm.json
egret/resource/default.thm.json
+1
-1
MapSkin.exml
egret/resource/skins/MapSkin.exml
+4
-3
MapScene.ts
egret/src/mapScene/MapScene.ts
+18
-9
SignPanel.ts
egret/src/panels/SignPanel.ts
+11
-10
home.json
mock/happyclear/home.json
+2
-2
No files found.
egret/resource/TextureMerger/blood2.tmproject
View file @
9a85a188
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["../assets/blood2/blood2按钮 副本1.png","../assets/blood2/blood2按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["../assets/blood2/blood2按钮 副本1.png","../assets/blood2/blood2按钮 副本.png","../assets/blood2/blood2.png"]}
\ No newline at end of file
egret/resource/TextureMerger/sign.tmproject
0 → 100644
View file @
9a85a188
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"sign","version":5,"files":["../assets/sign/signitem.png","../assets/sign/signicon5.png","../assets/sign/signicon4.png","../assets/sign/signicon3.png","../assets/sign/signicon2.png","../assets/sign/signbtn4.png","../assets/sign/signbtn3.png","../assets/sign/signbtn2.png","../assets/sign/signbtn1.png","../assets/sign/signbg.png","../assets/sign/sign_line2.png","../assets/sign/sign_line.png","../assets/sign/sign_light.png","../assets/sign/sign_icon1.png"]}
\ No newline at end of file
egret/resource/default.res.json
View file @
9a85a188
...
...
@@ -81,12 +81,8 @@
"name"
:
"exchange"
},
{
"keys"
:
""
,
"keys"
:
"
signitem_png,signicon5_png,signicon4_png,signicon3_png,signicon2_png,signbtn4_png,signbtn3_png,signbtn2_png,signbtn1_png,signbg_png,sign_line2_png,sign_line_png,sign_light_png,sign_icon1_png
"
,
"name"
:
"sign"
},
{
"name"
:
"preload"
,
"keys"
:
"signicon4_png,signicon5_png,signbg_png,sign_line2_png,sign_light_png"
}
],
"resources"
:
[
...
...
@@ -1811,29 +1807,29 @@
"name"
:
"blood2_png"
},
{
"
name"
:
"signicon4_
png"
,
"
url"
:
"assets/sign/signicon4.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/sign/signicon4.
png"
"
name"
:
"signicon4_
png"
},
{
"
name"
:
"signicon5_
png"
,
"
url"
:
"assets/sign/signicon5.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/sign/signicon5.
png"
"
name"
:
"signicon5_
png"
},
{
"
name"
:
"signbg_
png"
,
"
url"
:
"assets/sign/signbg.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/sign/signbg.
png"
"
name"
:
"signbg_
png"
},
{
"
name"
:
"sign_line2_
png"
,
"
url"
:
"assets/sign/sign_line2.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/sign/sign_line2.
png"
"
name"
:
"sign_line2_
png"
},
{
"
name"
:
"sign_light_
png"
,
"
url"
:
"assets/sign/sign_light.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/sign/sign_light.
png"
"
name"
:
"sign_light_
png"
}
]
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
9a85a188
...
...
@@ -2,7 +2,6 @@
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/SignItemSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/BloodSkin.exml"
,
...
...
@@ -34,6 +33,7 @@
"resource/skins/ShareSkin.exml"
,
"resource/skins/ShopSkin.exml"
,
"resource/skins/ShowOffSkin.exml"
,
"resource/skins/SignItemSkin.exml"
,
"resource/skins/SignPrizeSkin.exml"
,
"resource/skins/SignSkin.exml"
,
"resource/skins/StarSkin.exml"
,
...
...
egret/resource/skins/MapSkin.exml
View file @
9a85a188
...
...
@@ -22,9 +22,10 @@
</e:Group>
<e:Group
id=
"top"
x=
"36"
y=
"24"
>
<e:Image
source=
"元宝bg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"bloodTxt"
text=
"0/5"
x=
"78.04"
y=
"27.84"
width=
"82"
verticalAlign=
"middle"
textAlign=
"center"
/>
<e:Label
id=
"bloodTxt"
text=
"5"
x=
"12.71"
y=
"22.84"
width=
"49"
verticalAlign=
"middle"
textAlign=
"center"
size=
"36"
/>
<e:Label
id=
"fullTxt"
text=
"已满"
x=
"76.71"
y=
"29.84"
width=
"82"
verticalAlign=
"middle"
textAlign=
"center"
size=
"24"
visible=
"false"
/>
<e:Label
id=
"goldTxt"
text=
"0"
x=
"396.04"
y=
"27.84"
width=
"88"
verticalAlign=
"middle"
textAlign=
"center"
/>
<e:Button
id=
"bloodBtn"
label=
""
x=
"16
5.72
"
y=
"16.6"
>
<e:Button
id=
"bloodBtn"
label=
""
x=
"16
8.38
"
y=
"16.6"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"关闭 拷贝_png"
source.down=
"关闭 拷贝_png"
source.disabled=
"关闭 拷贝_png"
/>
...
...
@@ -40,7 +41,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"countdown"
text=
"00:00:00"
x=
"
212.88"
y=
"30.24"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
size=
"28"
textColor=
"0xff0000
"
/>
<e:Label
id=
"countdown"
text=
"00:00:00"
x=
"
77.39"
y=
"31.19"
verticalAlign=
"middle"
textAlign=
"center"
size=
"22
"
/>
</e:Group>
<e:Button
id=
"shopBtn"
label=
""
x=
"615.08"
y=
"154.01"
>
<e:skinName>
...
...
egret/src/mapScene/MapScene.ts
View file @
9a85a188
...
...
@@ -33,14 +33,20 @@ export default class MapScene extends Scene {
super
.
start
();
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
oldTimerStr
=
localStorage
.
getItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
);
if
(
oldTimerStr
!=
nowTimerStr
)
{
localStorage
.
setItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
,
nowTimerStr
);
PanelCtrl
.
instance
.
show
(
'sign'
);
}
NetManager
.
ins
.
getSignInfo
(()
=>
{
const
{
signInfoVO
}
=
DataManager
.
ins
.
getData
(
'getSignInfo'
);
if
(
signInfoVO
.
continueDay
>=
7
)
return
;
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
oldTimerStr
=
localStorage
.
getItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
);
if
(
oldTimerStr
!=
nowTimerStr
)
{
localStorage
.
setItem
(
'nowTimerStr'
+
window
[
'CFG'
].
consumerId
,
nowTimerStr
);
PanelCtrl
.
instance
.
show
(
'sign'
);
}
},
window
[
'signActivityId'
]);
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
playBg
();
...
...
@@ -287,13 +293,16 @@ export default class MapScene extends Scene {
const
data
=
getHomeData
();
if
(
data
.
remainEnargy
>=
BLOOD_NUMS_MAX
)
{
//满了
this
.
_countDown
.
stop
();
this
[
'fullTxt'
].
visible
=
true
;
this
[
'countdown'
].
visible
=
false
;
}
else
{
const
left
=
data
.
refectionCountdown
-
Math
.
floor
(
new
Date
().
getTime
()
/
1000
);
this
.
_countDown
.
reset
(
left
);
this
[
'countdown'
].
visible
=
true
;
this
[
'fullTxt'
].
visible
=
false
;
}
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
/5
`
;
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
`
;
}
protected
initEvents
()
{
...
...
egret/src/panels/SignPanel.ts
View file @
9a85a188
...
...
@@ -4,21 +4,22 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
// export const getSignInfo = ()=> {
// return new Promise((r) => {
// NetManager.ins.getSignInfo(() => {
// r();
// }, window['signActivityId']);
// })
// }
export
default
class
SignPanel
extends
Panel
{
getSignInfo
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
getSignInfo
(()
=>
{
r
();
},
window
[
'signActivityId'
]);
})
}
list
:
eui
.
List
;
scroll
:
eui
.
Scroller
;
async
start
(
data
)
{
super
.
start
();
await
this
.
getSignInfo
();
console
.
log
(
DataManager
.
ins
.
getData
(
'getSignInfo'
))
//
console.log(DataManager.ins.getData('getSignInfo'))
const
{
signInfoVO
}
=
DataManager
.
ins
.
getData
(
'getSignInfo'
);
// for (let i = 1; i <= 7; i++) {
...
...
@@ -57,7 +58,7 @@ export default class SignPanel extends Panel {
NetManager
.
ins
.
doSign
((
s
)
=>
{
if
(
s
)
{
item
.
setSinged
();
showToast
(
'签到成功~'
)
showToast
(
'签到成功
!快去闯关吧
~'
)
}
},
window
[
'signActivityId'
])
console
.
log
(
data
);
...
...
mock/happyclear/home.json
View file @
9a85a188
...
...
@@ -4,8 +4,8 @@
"desc"
:
"OK"
,
"timestamp"
:
1566885811001
,
"data"
:
{
"refectionCountdown"
:
0
,
"remainEnargy"
:
4
,
"refectionCountdown"
:
1
0
,
"remainEnargy"
:
5
,
"isGetAllTreasureBox"
:
0
,
"wealth"
:
7960
,
"totalStars"
:
145
,
...
...
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