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
c5f48176
Commit
c5f48176
authored
Nov 08, 2019
by
wjf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
5745a9bf
75e31530
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
596 additions
and
17 deletions
+596
-17
index.html
egret/index.html
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+7
-0
ActIcon.ts
egret/src/mapScene/icon/ActIcon.ts
+7
-0
HbRainIcon.ts
egret/src/mapScene/icon/HbRainIcon.ts
+10
-2
IconBase.ts
egret/src/mapScene/icon/IconBase.ts
+4
-0
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+3
-0
HbNoPrize.ts
egret/src/panels/HongbaoRain/HbNoPrize.ts
+4
-0
HbPrize.ts
egret/src/panels/HongbaoRain/HbPrize.ts
+4
-0
RainMgr.ts
egret/src/panels/HongbaoRain/RainMgr.ts
+1
-1
RainObj.ts
egret/src/panels/HongbaoRain/RainObj.ts
+2
-2
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+8
-4
hbRainBaseInfo.json
mock/happyclear/hbRainBaseInfo.json
+8
-4
home.json
mock/happyclear/home.json
+535
-1
mapRank.json
mock/happyclear/mapRank.json
+1
-1
turnablebaseInfo.json
mock/happyclear/turnablebaseInfo.json
+1
-1
No files found.
egret/index.html
View file @
c5f48176
...
...
@@ -60,7 +60,7 @@
<script
src=
"libs/fileSave.js"
></script>
<img
id=
"pic"
style=
"width:100%;position: absolute;z-index: 999;display: none;"
/>
<script>
window
[
'hbRainTime'
]
=
30
;
window
[
'hbRainTime'
]
=
30
;
// 红包雨倒计时
window
[
'plugs'
]
=
[
1
,
2
,
3
]
// localStorage.clear();
window
[
'isInvitePage'
]
=
0
;
...
...
egret/src/mapScene/MapScene.ts
View file @
c5f48176
...
...
@@ -316,6 +316,13 @@ export default class MapScene extends Scene {
if
(
icon
.
parent
)
count
++
;
}
if
(
this
.
_avatarsCache
)
{
this
.
_avatarsCache
.
forEach
((
item
)
=>
{
if
(
item
.
parent
)
item
.
parent
.
addChild
(
item
);
});
}
}
// 添加图标
...
...
egret/src/mapScene/icon/ActIcon.ts
View file @
c5f48176
...
...
@@ -60,6 +60,13 @@ export default class ActIcon {
private
onTap_actsShowBtn
()
{
this
.
actIconsGroup
.
visible
=
!
this
.
actIconsGroup
.
visible
;
if
(
this
.
actIconsGroup
.
visible
){
for
(
let
k
in
this
.
icons
){
if
(
this
.
icons
[
k
].
visible
){
this
.
icons
[
k
].
showLog
();
}
}
}
this
.
actIconsGroup
.
x
=
12.12
;
if
(
this
.
actIconsGroup
.
visible
==
false
)
{
this
.
actIconsGroup
.
x
=
-
999
;
...
...
egret/src/mapScene/icon/HbRainIcon.ts
View file @
c5f48176
...
...
@@ -2,6 +2,7 @@ import IconBase from "./IconBase";
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
export
default
class
HbRainIcon
extends
IconBase
{
...
...
@@ -15,6 +16,11 @@ export default class HbRainIcon extends IconBase {
this
.
updateIcon
();
}
public
showLog
()
{
super
.
showLog
();
NetManager
.
ins
.
showLog
(
getlogItem
(
57
));
}
private
updateIcon
()
{
NetManager
.
ins
.
hbRainBaseInfo
((
success
,
res
)
=>
{
if
(
!
success
)
{
...
...
@@ -29,16 +35,18 @@ export default class HbRainIcon extends IconBase {
return
;
}
this
.
visible
=
true
;
})
})
;
}
/**
* 点击icon
* @param e 点击事件
*/
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
57
));
NetManager
.
ins
.
hbRainBaseInfo
((
success
,
res
)
=>
{
PanelCtrl
.
instance
.
show
(
"HbCutTime"
,
{
res
:
res
});
});
...
...
egret/src/mapScene/icon/IconBase.ts
View file @
c5f48176
...
...
@@ -25,6 +25,10 @@ export default class IconBase {
this
.
start
();
}
public
showLog
(){
}
/**
* 设置图标提示的隐藏与显示
* @param visible
...
...
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
c5f48176
...
...
@@ -3,6 +3,7 @@ import CutTimer from "../../CutTimer";
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
HbRule
from
"./HbRule"
;
import
{
getlogItem
}
from
"../../Main"
;
/**
* 红包雨倒计时
...
...
@@ -50,6 +51,7 @@ export default class HbCutTime extends Panel {
time
=
data
.
currentSession
.
endTime
-
sysTime
+
3000
;
if
(
data
.
canJoin
)
{
this
.
ok_btn
.
source
=
'hbCutTime_btn_enable_png'
;
NetManager
.
ins
.
showLog
(
getlogItem
(
58
));
this
.
btnEffect
();
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
else
{
...
...
@@ -128,6 +130,7 @@ export default class HbCutTime extends Panel {
}
onTouchOK
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
58
));
PanelCtrl
.
instance
.
show
(
'HbGame'
,
{
needScore
:
this
.
data
.
res
.
data
.
currentSession
.
limitScore
});
}
...
...
egret/src/panels/HongbaoRain/HbNoPrize.ts
View file @
c5f48176
...
...
@@ -6,6 +6,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import
{
addAdComp
}
from
"../BoxPanel"
;
import
Utils
from
"../../Utils"
;
import
CutTimer
from
"../../CutTimer"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
/**
* 红包雨无奖励
...
...
@@ -26,6 +28,7 @@ export default class HbNoPrize extends Panel {
}
initUI
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
60
));
let
type
=
this
.
data
.
type
;
switch
(
true
)
{
case
(
type
==
1
):
...
...
@@ -62,6 +65,7 @@ export default class HbNoPrize extends Panel {
}
onTouchOK
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
60
));
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
super
.
hidePanel
();
...
...
egret/src/panels/HongbaoRain/HbPrize.ts
View file @
c5f48176
...
...
@@ -4,6 +4,8 @@ import { changeMapScene } from "../../startScene/StartScene";
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
HtmlTextParser
}
from
"../../../libs/new_wx/HtmlTextParser"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
/**
* 红包雨奖励
...
...
@@ -57,6 +59,7 @@ export default class HbPrize extends Panel {
}
initUI
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
59
));
}
...
...
@@ -76,6 +79,7 @@ export default class HbPrize extends Panel {
}
onTouchOK
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
59
));
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
])
{
changeMapScene
();
super
.
hidePanel
();
...
...
egret/src/panels/HongbaoRain/RainMgr.ts
View file @
c5f48176
...
...
@@ -35,7 +35,7 @@ export default class RainMgr {
GDispatcher
.
addEvent
(
'hbRainGameOver'
,
this
.
gameOver
,
this
);
this
.
timer
=
new
egret
.
Timer
(
1
2
00
,
0
);
this
.
timer
=
new
egret
.
Timer
(
1
0
00
,
0
);
this
.
timer
.
addEventListener
(
egret
.
TimerEvent
.
TIMER
,
this
.
addRain
,
this
);
this
.
timer
.
start
();
}
...
...
egret/src/panels/HongbaoRain/RainObj.ts
View file @
c5f48176
...
...
@@ -30,9 +30,9 @@ export default class RainObj {
this
.
module
.
alpha
=
1
;
this
.
module
.
touchEnabled
=
true
;
this
.
module
.
source
=
`hbGame_
${
this
.
data
.
key
}
_png`
;
this
.
module
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_
TAP
,
this
.
touchTap
,
this
);
this
.
module
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_
BEGIN
,
this
.
touchTap
,
this
);
egret
.
Tween
.
get
(
this
.
module
,
{
loop
:
true
}).
to
({
rotation
:
~~
(
Math
.
random
()
*
2
)
?
360
:
-
360
},
18000
);
egret
.
Tween
.
get
(
this
.
module
).
to
({
y
:
this
.
rainGroup
.
height
+
200
},
5
000
).
call
(()
=>
this
.
destroy
());
egret
.
Tween
.
get
(
this
.
module
).
to
({
y
:
this
.
rainGroup
.
height
+
200
},
4
000
).
call
(()
=>
this
.
destroy
());
}
private
touchTap
()
{
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
c5f48176
...
...
@@ -122,10 +122,10 @@ export default class Turntable extends Panel {
console
.
warn
(
error
)
}
NetManager
.
ins
.
hc_turnableDojoin
((
success
,
res
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
this
[
'nums'
].
text
=
`当前可用元宝:
${
getHomeData
().
wealth
}
`
;
},
window
[
'collectRuleId'
]);
//
NetManager.ins.hc_home(() => {
//
SceneCtrl.instance.updateScene();
//
this['nums'].text = `当前可用元宝:${getHomeData().wealth}`;
//
}, window['collectRuleId']);
Loading
.
instace
.
hide
();
// if(!success) {
// return;
...
...
@@ -144,6 +144,10 @@ export default class Turntable extends Panel {
id
=
data
.
option
.
categoryType
;
}
this
.
rotateByPrize
(
id
,
()
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
this
[
'nums'
].
text
=
`当前可用元宝:
${
getHomeData
().
wealth
}
`
;
},
window
[
'collectRuleId'
]);
if
(
!
success
)
{
switch
(
true
)
{
case
(
code
==
"600051"
):
// 元宝不足
...
...
mock/happyclear/hbRainBaseInfo.json
View file @
c5f48176
...
...
@@ -2,11 +2,15 @@
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1573
131493110
,
"timestamp"
:
1573
206010193
,
"data"
:
{
"currentSession"
:
null
,
"currentRemainTimes"
:
0
,
"nextSession"
:
null
,
"canJoin"
:
false
"currentSession"
:
{
"sessionIndex"
:
10
,
"startTime"
:
1573210800000
,
"endTime"
:
1573212600000
,
"limitScore"
:
10
},
"canJoin"
:
true
}
}
\ No newline at end of file
mock/happyclear/home.json
View file @
c5f48176
This diff is collapsed.
Click to expand it.
mock/happyclear/mapRank.json
View file @
c5f48176
...
...
@@ -5,7 +5,7 @@
"timestamp"
:
1571322224593
,
"data"
:
[
{
"levelNum"
:
2
1
,
"levelNum"
:
10
1
,
"rank"
:
[
{
"nickName"
:
null
,
...
...
mock/happyclear/turnablebaseInfo.json
View file @
c5f48176
...
...
@@ -113,7 +113,7 @@
],
"id"
:
null
},
"nextTimeNeedCoin"
:
8888
"nextTimeNeedCoin"
:
1
},
"success"
:
true
,
"desc"
:
"OK"
,
...
...
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