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
0545c7ee
Commit
0545c7ee
authored
Nov 12, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a7a36da1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
15 deletions
+40
-15
StartPanelSkin.exml
egret/resource/skins/StartPanelSkin.exml
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+17
-1
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+19
-10
StartPanel.ts
egret/src/panels/StartPanel.ts
+2
-2
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+1
-1
No files found.
egret/resource/skins/StartPanelSkin.exml
View file @
0545c7ee
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"StartPanelSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16cd285c715"
/>
<e:Group
x=
"84"
y=
"9
25
"
visible=
"false"
>
<e:Group
x=
"84"
y=
"9
11
"
visible=
"false"
>
<e:Image
source=
"startpanel_bg2_png"
y=
"0"
x=
"0"
/>
<e:List
id=
"friendlist"
itemRendererSkinName=
"FriendItem2Skin"
y=
"48"
x=
"9"
>
<e:ArrayCollection>
...
...
egret/src/mapScene/MapScene.ts
View file @
0545c7ee
...
...
@@ -29,6 +29,7 @@ import createRegTriangle from "../playScene/factory/createRegTriangle";
import
RedBagAni
,
{
createRedBagIcon
}
from
"./RedBagAni"
;
import
{
createEffect2MovieClip
}
from
"../effect/createEffect2"
;
import
ActIcon
from
"./icon/ActIcon"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
let
doHelpFlag
=
false
;
// let doScratchHelpFlag = false;
...
...
@@ -109,10 +110,13 @@ export default class MapScene extends Scene {
private
cutTime
:
number
;
onLoad
()
{
super
.
onLoad
().
then
(()
=>
{});
super
.
onLoad
().
then
(()
=>
{
});
function
hbRainBaseInfo
()
{
return
new
Promise
((
resolve
,
reject
)
=>
NetManager
.
ins
.
hbRainBaseInfo
(()
=>
resolve
()));
}
return
Promise
.
all
([
hbRainBaseInfo
(),
]);
...
...
@@ -179,6 +183,18 @@ export default class MapScene extends Scene {
}
this
.
updateSign
();
// 红包雨强提示
const
hbRainRes
=
DataManager
.
ins
.
getData
(
NetName
.
HBRAIN_BASEINFO
);
if
(
hbRainRes
.
data
.
currentSession
||
hbRainRes
.
data
.
nextSession
)
{
const
sessionId
=
hbRainRes
.
data
.
currentSession
?
hbRainRes
.
data
.
currentSession
.
sessionIndex
:
hbRainRes
.
data
.
nextSession
.
sessionIndex
;
// 场次ID
const
nowTimerStr3
=
date
.
getTime
()
+
sessionId
+
''
;
const
oldTimerStr3
=
localStorage
.
getItem
(
'nowTimer3Str'
+
window
[
'CFG'
].
consumerId
);
if
(
nowTimerStr3
!=
oldTimerStr3
)
{
panels
.
push
(
'HbCutTime'
);
localStorage
.
setItem
(
'nowTimer3Str'
+
window
[
'CFG'
].
consumerId
,
nowTimerStr3
);
}
}
if
(
!
readCache
()
&&
getHomeData
().
levels
.
length
<=
0
)
{
//引导
const
guide
=
new
GuideCon
(()
=>
{
PanelCtrl
.
instance
.
showPanels
(
panels
,
[],
this
.
onAllPanelHide
);
...
...
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
0545c7ee
...
...
@@ -5,6 +5,8 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import
HbRule
from
"./HbRule"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
import
{
NetName
}
from
"../../../libs/tw/enum/NetName"
;
/**
* 红包雨倒计时
...
...
@@ -20,7 +22,7 @@ export default class HbCutTime extends Panel {
constructor
(
data
)
{
super
();
this
.
data
=
data
;
data
?
this
.
data
=
data
:
this
.
data
.
res
=
DataManager
.
ins
.
getData
(
NetName
.
HBRAIN_BASEINFO
)
;
}
start
()
{
...
...
@@ -34,19 +36,20 @@ export default class HbCutTime extends Panel {
this
.
ok_btn
.
anchorOffsetY
=
52
;
}
getData
():
any
{
return
new
Promise
((
r
)
=>
{
getData
():
any
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
hbRainBaseInfo
((
success
,
res
)
=>
{
r
(
res
);
});
});
}
private
hbRainBaseInfo
(
updateData
?)
{
const
success
=
this
.
data
.
res
.
success
;
const
res
=
updateData
||
this
.
data
.
res
;
const
res
=
updateData
||
this
.
data
.
res
;
const
data
=
(
updateData
&&
updateData
.
data
)
||
this
.
data
.
res
.
data
;
if
(
updateData
&&
updateData
.
data
)
this
.
data
.
res
=
updateData
;
this
.
data
.
res
=
updateData
;
if
(
!
success
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_soon_png'
;
...
...
@@ -58,7 +61,7 @@ export default class HbCutTime extends Panel {
const
getData
=
await
this
.
getData
();
//重新获取数据
if
(
getData
.
success
)
{
this
.
hbRainBaseInfo
(
getData
);
}
else
{
}
else
{
this
.
hidePanel
();
//没有数据关闭窗口
}
GDispatcher
.
dispatchEvent
(
'updateHbRainIcon'
);
...
...
@@ -83,7 +86,7 @@ export default class HbCutTime extends Panel {
}
}
else
if
(
data
.
nextSession
)
{
egret
.
Tween
.
removeTweens
(
this
.
ok_btn
);
this
.
ok_btn
.
scaleX
=
this
.
ok_btn
.
scaleY
=
1
;
this
.
ok_btn
.
scaleX
=
this
.
ok_btn
.
scaleY
=
1
;
time
=
data
.
nextSession
.
startTime
-
sysTime
+
3000
;
this
.
ok_btn
.
source
=
'hbCutTime_btn_soon_png'
;
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
...
...
@@ -102,8 +105,14 @@ export default class HbCutTime extends Panel {
private
btnEffect
()
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9618
,
scaleY
:
1.0618
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
,
egret
.
Ease
.
quadInOut
).
wait
(
1000
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
0.9618
,
scaleY
:
1.0618
},
200
,
egret
.
Ease
.
quadInOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
ok_btn
).
to
({
scaleX
:
1
,
scaleY
:
1
},
200
,
egret
.
Ease
.
quadInOut
).
wait
(
1000
).
call
(()
=>
{
this
.
btnEffect
();
})
});
...
...
egret/src/panels/StartPanel.ts
View file @
0545c7ee
...
...
@@ -37,11 +37,11 @@ showlog(){
const
homedata
=
getHomeData
();
if
(
data
>
homedata
.
levels
.
length
)
{
addAdComp
(
84
,
9
25
,
this
,
29
);
addAdComp
(
84
,
9
11
,
this
,
29
);
NetManager
.
ins
.
showLog
(
getlogItem
(
29
));
}
else
addRankFriendList
(
84
,
9
25
,
this
,
data
);
addRankFriendList
(
84
,
9
11
,
this
,
data
);
setGlow
(
this
[
'levelTxt'
],
0xfa4b09
,
1
);
this
[
'levelTxt'
].
text
=
`第
${
data
}
关`
;
...
...
mock/happyclear/hbRainBaseInfo.json
View file @
0545c7ee
...
...
@@ -6,7 +6,7 @@
"data"
:
{
"currentRemainTimes"
:
0
,
"currentSession"
:
{
"sessionIndex"
:
10
,
"sessionIndex"
:
6
,
"startTime"
:
1573210800000
,
"endTime"
:
1573210803000
,
"limitScore"
:
10
...
...
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