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
cf3426ce
Commit
cf3426ce
authored
Sep 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2410f6a3
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
80 additions
and
19 deletions
+80
-19
exml.json
egret/.wing/exml.json
+11
-0
MainBase.ts
egret/libs/new_wx/MainBase.ts
+22
-13
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+3
-3
signprize_btn.png
egret/resource/assets/signprize/signprize_btn.png
+0
-0
singprizebg.png
egret/resource/assets/signprize/singprizebg.png
+0
-0
default.res.json
egret/resource/default.res.json
+14
-0
SignPrizeSkin.exml
egret/resource/skins/SignPrizeSkin.exml
+20
-1
CountDown.ts
egret/src/mapScene/CountDown.ts
+1
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-0
SignPanel.ts
egret/src/panels/SignPanel.ts
+5
-0
home.json
mock/happyclear/home.json
+2
-2
No files found.
egret/.wing/exml.json
View file @
cf3426ce
...
...
@@ -190,5 +190,16 @@
"useBgColor"
:
true
,
"backgroundColor"
:
"#c1c1c1"
,
"backgroundAlpha"
:
100
},
"16d5c2563ca"
:
{
"bindingDataTestObj"
:
[]
},
"16d5c2563cb"
:
{
"bindingDataTestObj"
:
[
{
"key"
:
"data.img"
,
"value"
:
"http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif"
}
]
}
}
\ No newline at end of file
egret/libs/new_wx/MainBase.ts
View file @
cf3426ce
...
...
@@ -277,8 +277,6 @@ export default class MainBase extends eui.UILayer {
const
result
=
DataManager
.
ins
.
getData
(
'getShareInfo'
);
window
[
'registerWX'
](
result
);
});
updateMainTimer
();
}
}
...
...
@@ -304,16 +302,19 @@ export default class MainBase extends eui.UILayer {
playGameBg
();
}
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
//更新bloodpanel和mapscene
const
currentScene
=
SceneCtrl
.
instance
.
currentScene
;
if
(
currentScene
&&
currentScene
[
'updateTimerView'
])
currentScene
[
'updateTimerView'
]();
const
current
=
PanelCtrl
.
instance
.
_current
;
if
(
current
&&
current
[
'updateTimerView'
])
current
[
'updateTimerView'
]();
},
window
[
'collectRuleId'
]);
if
(
timerInit
)
{
NetManager
.
ins
.
hc_home
(()
=>
{
updateMainTimer
();
//更新bloodpanel和mapscene
const
currentScene
=
SceneCtrl
.
instance
.
currentScene
;
if
(
currentScene
&&
currentScene
[
'updateTimerView'
])
currentScene
[
'updateTimerView'
]();
const
current
=
PanelCtrl
.
instance
.
_current
;
if
(
current
&&
current
[
'updateTimerView'
])
current
[
'updateTimerView'
]();
},
window
[
'collectRuleId'
]);
}
}
if
(
document
.
visibilityState
==
"hidden"
)
{
...
...
@@ -324,7 +325,15 @@ export default class MainBase extends eui.UILayer {
}
}
let
timerInit
=
false
;
export
const
initTimer
=
()
=>
{
if
(
timerInit
)
return
;
timerInit
=
true
;
const
data
=
getHomeData
();
if
(
data
.
refectionCountdown
==
0
)
data
.
refectionCountdown
=
2
;
data
.
refectionCountdown
+=
Math
.
floor
(
new
Date
().
getTime
()
/
1000
);
updateMainTimer
();
}
const
timer
=
new
egret
.
Timer
(
1000
);
timer
.
addEventListener
(
egret
.
TimerEvent
.
TIMER_COMPLETE
,
()
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
...
...
egret/libs/tw/manager/NetManager.ts
View file @
cf3426ce
...
...
@@ -1780,9 +1780,9 @@ export class NetManager extends ABNetManager {
* @param result 结果
*/
protected
onResponse
(
net
:
INetData
,
result
:
any
):
void
{
if
(
net
.
name
==
'hc_home'
)
{
result
.
data
.
refectionCountdown
+=
Math
.
floor
(
new
Date
().
getTime
()
/
1000
);
}
//
if(net.name == 'hc_home') {
//
result.data.refectionCountdown += Math.floor(new Date().getTime()/1000);
//
}
//数据处理
const
data
:
Data
=
DataManager
.
ins
.
updateData
(
net
.
name
,
result
,
net
.
param
);
//接口成功
...
...
egret/resource/assets/signprize/signprize_btn.png
0 → 100644
View file @
cf3426ce
20.3 KB
egret/resource/assets/signprize/singprizebg.png
0 → 100644
View file @
cf3426ce
90.6 KB
egret/resource/default.res.json
View file @
cf3426ce
...
...
@@ -79,6 +79,10 @@
{
"keys"
:
"购买炸弹_png"
,
"name"
:
"exchange"
},
{
"name"
:
"preload"
,
"keys"
:
"signprize_btn_png,singprizebg_png"
}
],
"resources"
:
[
...
...
@@ -1716,6 +1720,16 @@
"url"
:
"assets/blood2/blood2按钮 副本.png"
,
"type"
:
"image"
,
"name"
:
"blood2按钮 副本_png"
},
{
"name"
:
"signprize_btn_png"
,
"type"
:
"image"
,
"url"
:
"assets/signprize/signprize_btn.png"
},
{
"name"
:
"singprizebg_png"
,
"type"
:
"image"
,
"url"
:
"assets/signprize/singprizebg.png"
}
]
}
\ No newline at end of file
egret/resource/skins/SignPrizeSkin.exml
View file @
cf3426ce
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"SignPrizeSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Skin
class=
"SignPrizeSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16d5c2563cb"
/>
<e:Image
source=
"singprizebg_png"
y=
"20"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"604"
y=
"164"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"close2Btn"
label=
""
y=
"564"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"signprize_btn_png"
source.down=
"signprize_btn_png"
source.disabled=
"signprize_btn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image
id=
"img"
y=
"297"
touchEnabled=
"true"
source=
"{data.img}"
width=
"512"
height=
"240"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"0"
/>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/CountDown.ts
View file @
cf3426ce
...
...
@@ -43,6 +43,7 @@ export default class CountDown extends egret.EventDispatcher {
this
.
_timer
.
stop
();
this
.
_timer
.
repeatCount
=
repeatCount
;
this
.
_timer
.
reset
();
if
(
repeatCount
>
0
)
this
.
_timer
.
start
();
this
.
updateTxt
();
}
...
...
egret/src/mapScene/MapScene.ts
View file @
cf3426ce
...
...
@@ -18,6 +18,7 @@ import setGray from "../setGray";
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
CountDown
from
"./CountDown"
;
import
{
initTimer
}
from
"../../libs/new_wx/MainBase"
;
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
...
...
@@ -31,6 +32,7 @@ export default class MapScene extends Scene {
async
start
(
data
?)
{
super
.
start
();
initTimer
();
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
playBg
();
}
...
...
egret/src/panels/SignPanel.ts
View file @
cf3426ce
...
...
@@ -3,6 +3,11 @@ import Panel from "../../libs/new_wx/components/Panel";
export
default
class
SignPanel
extends
Panel
{
start
(
data
)
{
super
.
start
();
//要更新元宝数量
// this['close2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
// NetManager.ins.clickLog(getlogItem(17));
...
...
mock/happyclear/home.json
View file @
cf3426ce
...
...
@@ -4,8 +4,8 @@
"desc"
:
"OK"
,
"timestamp"
:
1566885811001
,
"data"
:
{
"refectionCountdown"
:
1
0
,
"remainEnargy"
:
4
,
"refectionCountdown"
:
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