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
20ed613c
Commit
20ed613c
authored
Sep 18, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
eee8208d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
4 deletions
+39
-4
index.html
egret/index.html
+1
-1
getHomeData.ts
egret/src/getHomeData.ts
+1
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+2
-0
StartPanel.ts
egret/src/panels/StartPanel.ts
+32
-2
home.json
mock/happyclear/home.json
+2
-1
openTreasureBox.json
mock/happyclear/openTreasureBox.json
+1
-0
No files found.
egret/index.html
View file @
20ed613c
...
...
@@ -57,7 +57,7 @@
window
[
'duiba'
]
=
''
;
// window['duiba'] = '/duiba';
window
[
'registerWX'
]
=
(
result
)
=>
{
console
.
log
(
result
)}
window
[
'price1'
]
=
1
;
window
[
'price1'
]
=
1
23
;
window
[
'price2'
]
=
2
;
window
[
'price3'
]
=
3
;
window
[
'price4'
]
=
4
;
...
...
egret/src/getHomeData.ts
View file @
20ed613c
...
...
@@ -3,6 +3,7 @@ interface IHomeData {
levels
:{
levelNum
,
maxScore
,
stars
}[];
totalStars
;
canReceiveTreasureBoxNum
;
isGetAllTreasureBox
;
wealth
;
remainEnargy
;
nextRangeStarsNum
;
...
...
egret/src/mapScene/MapScene.ts
View file @
20ed613c
...
...
@@ -223,6 +223,7 @@ export default class MapScene extends Scene {
this
[
'boxiconWrapper'
].
visible
=
homeData
.
canReceiveTreasureBoxNum
>
0
;
this
[
'totalStarTxt'
].
text
=
`
${
homeData
.
totalStars
}
/
${
homeData
.
nextRangeStarsNum
}
`
;
this
[
'boxNumsTxt'
].
text
=
`
${
homeData
.
canReceiveTreasureBoxNum
}
`
;
this
[
'treasureboxBtn'
].
visible
=
!
homeData
.
isGetAllTreasureBox
;
}
updateScene
()
{
...
...
@@ -370,6 +371,7 @@ export default class MapScene extends Scene {
homeData
.
canReceiveTreasureBoxNum
=
boxdata
.
canReceiveTreasureBoxNum
;
homeData
.
nextRangeStarsNum
=
boxdata
.
nextRangeStarsNum
;
homeData
.
totalStarts
=
boxdata
.
totalStarts
;
homeData
.
isGetAllTreasureBox
=
boxdata
.
isGetAllTreasureBox
;
this
.
updateBox
();
const
data
=
DataManager
.
ins
.
getData
(
'hc_openTreasureBox'
).
data
;
NetManager
.
ins
.
getPlugOrderStatus
((
s
)
=>
{
...
...
egret/src/panels/StartPanel.ts
View file @
20ed613c
...
...
@@ -5,11 +5,18 @@ import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
{
Chapters
}
from
"../something/Chapters"
;
import
{
PassType
}
from
"../something/enum/PassType"
;
import
{
getPropNums
}
from
"../getHomeData"
;
import
getHomeData
,
{
getPropNums
}
from
"../getHomeData"
;
import
PropType
from
"../PropType"
;
import
hdGameDoDojoin
from
"../../libs/new_tw/ctrls/hdGameDoDojoin"
;
import
TargetItemRenderer
from
"./TargetItemRenderer"
;
import
{
ElementType
}
from
"../something/enum/ElementType"
;
import
{
iswx
}
from
"../iswx"
;
import
{
getShareUrl
}
from
"../getSharePic"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
wait
from
"../../libs/new_tc/wait"
;
export
default
class
StartPanel
extends
Panel
{
private
_level
;
...
...
@@ -61,6 +68,27 @@ export default class StartPanel extends Panel {
}
onTap_startBtn
()
{
const
homeData
=
getHomeData
();
if
(
homeData
.
remainEnargy
<=
0
)
{
if
(
homeData
.
askForEnergy
)
{
PanelCtrl
.
instance
.
show
(
'bloodPanel'
);
}
else
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
}
else
showShare
(
1
);
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
return
;
}
// Loading.instace.show();
this
.
touchChildren
=
false
;
this
.
touchEnabled
=
false
;
...
...
@@ -89,7 +117,9 @@ export default class StartPanel extends Panel {
this
.
hidePanel
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAIN_SCENE
,
{
chapter
:
this
.
_level
});
}
},
this
.
_level
)
},
this
.
_level
);
}
onTap_buy1btn
()
{
PanelCtrl
.
instance
.
show
(
'Buy1'
);
...
...
mock/happyclear/home.json
View file @
20ed613c
...
...
@@ -4,6 +4,7 @@
"desc"
:
"OK"
,
"timestamp"
:
1566885811031
,
"data"
:
{
"isGetAllTreasureBox"
:
0
,
"wealth"
:
7960
,
"totalStars"
:
145
,
"levels"
:
[
...
...
@@ -153,7 +154,7 @@
"num"
:
10
}
],
"remainEnargy"
:
9979
,
"remainEnargy"
:
0
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
150
...
...
mock/happyclear/openTreasureBox.json
View file @
20ed613c
...
...
@@ -6,6 +6,7 @@
"data"
:
{
"canReceiveTreasureBoxNum"
:
99
,
"nextRangeStarsNum"
:
25
,
"isGetAllTreasureBox"
:
1
,
"orderNum"
:
"1078836456709300393"
,
"totalStars"
:
12
}
...
...
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