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
27e7d2fc
Commit
27e7d2fc
authored
Aug 22, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ef861fa8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
58 deletions
+59
-58
mainScene.tmproject
egret/resource/TextureMerger/mainScene.tmproject
+1
-0
MapSkin.exml
egret/resource/skins/MapSkin.exml
+8
-5
getHomeData.ts
egret/src/getHomeData.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+35
-9
home.json
mock/happyclear/home.json
+14
-43
No files found.
egret/resource/TextureMerger/mainScene.tmproject
0 → 100644
View file @
27e7d2fc
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"mainScene","version":5,"files":["../assets/mainScene/yezi1.png","../assets/mainScene/unlightedStar.png","../assets/mainScene/targetBoard.png","../assets/mainScene/stepsBoard.png","../assets/mainScene/stepNumber9.png","../assets/mainScene/stepNumber8.png","../assets/mainScene/stepNumber7.png","../assets/mainScene/stepNumber6.png","../assets/mainScene/stepNumber5.png","../assets/mainScene/stepNumber4.png","../assets/mainScene/stepNumber3.png","../assets/mainScene/stepNumber2.png","../assets/mainScene/stepNumber1.png","../assets/mainScene/stepNumber0.png","../assets/mainScene/stepBtn.png","../assets/mainScene/starProgress.png","../assets/mainScene/setting.png","../assets/mainScene/scoreNumber9.png","../assets/mainScene/scoreNumber8.png","../assets/mainScene/scoreNumber7.png","../assets/mainScene/scoreNumber6.png","../assets/mainScene/scoreNumber5.png","../assets/mainScene/scoreNumber4.png","../assets/mainScene/scoreNumber3.png","../assets/mainScene/scoreNumber2.png","../assets/mainScene/scoreNumber1.png","../assets/mainScene/scoreNumber0.png","../assets/mainScene/rock6.png","../assets/mainScene/rock5.png","../assets/mainScene/rock4.png","../assets/mainScene/rock3.png","../assets/mainScene/rock2.png","../assets/mainScene/rock1.png","../assets/mainScene/rightMark.png","../assets/mainScene/rightArrow.png","../assets/mainScene/rectLat.png","../assets/mainScene/progressDown.png","../assets/mainScene/playSceneBg.png","../assets/mainScene/magicLionBg.png","../assets/mainScene/magicLion.png","../assets/mainScene/lockUp.png","../assets/mainScene/lockDown.png","../assets/mainScene/lineLight.png","../assets/mainScene/lightedStar.png","../assets/mainScene/leftArrow.png","../assets/mainScene/ice6.png","../assets/mainScene/ice5.png","../assets/mainScene/ice4.png","../assets/mainScene/ice3.png","../assets/mainScene/ice2.png","../assets/mainScene/ice1.png","../assets/mainScene/hammerBtn.png","../assets/mainScene/eleDis9.png","../assets/mainScene/eleDis8.png","../assets/mainScene/eleDis7.png","../assets/mainScene/eleDis6.png","../assets/mainScene/eleDis5.png","../assets/mainScene/eleDis4.png","../assets/mainScene/eleDis3.png","../assets/mainScene/eleDis2.png","../assets/mainScene/eleDis12.png","../assets/mainScene/eleDis11.png","../assets/mainScene/eleDis10.png","../assets/mainScene/eleDis1.png","../assets/mainScene/ele5.png","../assets/mainScene/ele42.png","../assets/mainScene/ele41.png","../assets/mainScene/ele40.png","../assets/mainScene/ele4.png","../assets/mainScene/ele32.png","../assets/mainScene/ele31.png","../assets/mainScene/ele30.png","../assets/mainScene/ele3.png","../assets/mainScene/ele22.png","../assets/mainScene/ele21.png","../assets/mainScene/ele20.png","../assets/mainScene/ele2.png","../assets/mainScene/ele12.png","../assets/mainScene/ele11.png","../assets/mainScene/ele10.png","../assets/mainScene/ele1.png","../assets/mainScene/ele02.png","../assets/mainScene/ele01.png","../assets/mainScene/ele00.png","../assets/mainScene/ele0.png","../assets/mainScene/dangqianfenshu.png","../assets/mainScene/chooseRect.png","../assets/mainScene/boomBtn.png","../assets/mainScene/boom9.png","../assets/mainScene/boom8.png","../assets/mainScene/boom7.png","../assets/mainScene/boom6.png","../assets/mainScene/boom5.png","../assets/mainScene/boom4.png","../assets/mainScene/boom3.png","../assets/mainScene/boom2.png","../assets/mainScene/boom18.png","../assets/mainScene/boom17.png","../assets/mainScene/boom16.png","../assets/mainScene/boom15.png","../assets/mainScene/boom14.png","../assets/mainScene/boom13.png","../assets/mainScene/boom12.png","../assets/mainScene/boom11.png","../assets/mainScene/boom10.png","../assets/mainScene/boom1.png","../assets/mainScene/mainSoundBtnOn.png","../assets/mainScene/mainSettingBg.png","../assets/mainScene/mainQuestionBtn.png","../assets/mainScene/mainMusicBtnOn.png","../assets/mainScene/mainQuitBtn.png","../assets/mainScene/mainSoundBtnOff.png","../assets/mainScene/mainMusicBtnOff.png","../assets/mainScene/targetNumber9.png","../assets/mainScene/targetNumber8.png","../assets/mainScene/targetNumber7.png","../assets/mainScene/targetNumber6.png","../assets/mainScene/targetNumber5.png","../assets/mainScene/targetNumber4.png","../assets/mainScene/targetNumber3.png","../assets/mainScene/targetNumber2.png","../assets/mainScene/targetNumber1.png","../assets/mainScene/targetNumber0.png","../assets/mainScene/ele7.png","../assets/mainScene/ele6.png","../assets/mainScene/bonusFra9.png","../assets/mainScene/bonusFra8.png","../assets/mainScene/bonusFra7.png","../assets/mainScene/bonusFra6.png","../assets/mainScene/bonusFra5.png","../assets/mainScene/bonusFra4.png","../assets/mainScene/bonusFra3.png","../assets/mainScene/bonusFra27.png","../assets/mainScene/bonusFra26.png","../assets/mainScene/bonusFra25.png","../assets/mainScene/bonusFra24.png","../assets/mainScene/bonusFra23.png","../assets/mainScene/bonusFra22.png","../assets/mainScene/bonusFra21.png","../assets/mainScene/bonusFra20.png","../assets/mainScene/bonusFra2.png","../assets/mainScene/bonusFra19.png","../assets/mainScene/bonusFra18.png","../assets/mainScene/bonusFra17.png","../assets/mainScene/bonusFra16.png","../assets/mainScene/bonusFra15.png","../assets/mainScene/bonusFra14.png","../assets/mainScene/bonusFra13.png","../assets/mainScene/bonusFra12.png","../assets/mainScene/bonusFra11.png","../assets/mainScene/bonusFra10.png","../assets/mainScene/bonusFra1.png","../assets/mainScene/bonusShoot.png","../assets/mainScene/guideTxt5.png","../assets/mainScene/guideTxt4.png","../assets/mainScene/guideTxt3.png","../assets/mainScene/guideTxt2.png","../assets/mainScene/guideTxt1.png","../assets/mainScene/guideKnowBtn.png","../assets/mainScene/guideBg.png","../assets/mainScene/propNum9.png","../assets/mainScene/propNum8.png","../assets/mainScene/propNum7.png","../assets/mainScene/propNum6.png","../assets/mainScene/propNum5.png","../assets/mainScene/propNum4.png","../assets/mainScene/propNum3.png","../assets/mainScene/propNum2.png","../assets/mainScene/propNum1.png","../assets/mainScene/propNum0.png","../assets/mainScene/propNumBg.png"]}
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
27e7d2fc
...
...
@@ -86,11 +86,14 @@
</e:skinName>
</e:Button>
</e:Group>
<e:Group
id=
"boxani"
x=
"19"
y=
"251"
visible=
"false"
>
<e:Image
id=
"lightbg"
source=
"光 副本 4_png"
y=
"0"
x=
"0"
/>
<e:Image
id=
"boxFrame1"
source=
"宝箱1_png"
x=
"156"
y=
"95"
/>
<e:Image
id=
"boxFrame2"
source=
"宝箱2_png"
x=
"69.06"
y=
"32.7"
/>
<e:Image
id=
"boxFrame3"
source=
"宝箱3_png"
x=
"68.78"
y=
"-30.72"
/>
<e:Group
id=
"boxLayer"
x=
"0"
y=
"0"
visible=
"false"
>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
x=
"0"
y=
"0"
/>
<e:Group
id=
"boxani"
x=
"19"
y=
"251"
>
<e:Image
id=
"lightbg"
source=
"光 副本 4_png"
y=
"0"
x=
"0"
/>
<e:Image
id=
"boxFrame1"
source=
"宝箱1_png"
x=
"156"
y=
"95"
/>
<e:Image
id=
"boxFrame2"
source=
"宝箱2_png"
x=
"69.06"
y=
"32.7"
/>
<e:Image
id=
"boxFrame3"
source=
"宝箱3_png"
x=
"68.78"
y=
"-30.72"
/>
</e:Group>
</e:Group>
<w:Config
id=
"16c89f4ae1a"
/>
</e:Skin>
\ No newline at end of file
egret/src/getHomeData.ts
View file @
27e7d2fc
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
interface
IHomeData
{
levels
:{
levelNum
,
maxScore
,
stars
}[];
totalStar
t
s
;
totalStars
;
canReceiveTreasureBoxNum
;
wealth
;
remainEnargy
;
...
...
egret/src/mapScene/MapScene.ts
View file @
27e7d2fc
...
...
@@ -9,6 +9,7 @@ import MapBottomPart from "./MapBottomPart";
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
wait
from
"../../libs/new_tc/wait"
;
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
...
...
@@ -74,7 +75,7 @@ export default class MapScene extends Scene {
updateBox
()
{
const
homeData
=
getHomeData
();
this
[
'boxiconWrapper'
].
visible
=
homeData
.
canReceiveTreasureBoxNum
>
0
;
this
[
'totalStarTxt'
].
text
=
`
${
homeData
.
totalStar
t
s
}
/
${
homeData
.
canReceiveTreasureBoxNum
}
`
;
this
[
'totalStarTxt'
].
text
=
`
${
homeData
.
totalStars
}
/
${
homeData
.
canReceiveTreasureBoxNum
}
`
;
this
[
'boxNumsTxt'
].
text
=
`
${
homeData
.
canReceiveTreasureBoxNum
}
`
;
}
...
...
@@ -85,7 +86,7 @@ export default class MapScene extends Scene {
const
homeData
=
getHomeData
();
this
[
'bloodTxt'
].
text
=
`
${
homeData
.
remainEnargy
}
/5`
;
this
[
'goldTxt'
].
text
=
`
${
homeData
.
wealth
}
`
;
for
(
let
j
=
0
;
j
<
70
;
j
++
)
{
this
.
disableIcon
(
j
+
1
);
}
...
...
@@ -107,21 +108,46 @@ export default class MapScene extends Scene {
this
[
'settingBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
toggleSettings
,
this
)
this
[
'shopBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_shopBtn
,
this
)
this
[
'questionBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_questionBtn
,
this
);
this
[
'box'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_box
,
this
);
this
[
'box'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boxLayer
,
this
);
this
[
'boxani'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_box
,
this
);
}
onTap_boxLayer
()
{
this
[
'boxLayer'
].
visible
=
true
;
this
[
'boxFrame1'
].
visible
=
true
;
this
[
'boxFrame2'
].
visible
=
false
;
this
[
'boxFrame3'
].
visible
=
false
;
}
async
playAni
()
{
this
[
'boxFrame1'
].
visible
=
true
;
this
[
'boxFrame2'
].
visible
=
false
;
this
[
'boxFrame3'
].
visible
=
false
;
await
wait
(
1000
/
10
);
this
[
'boxFrame1'
].
visible
=
false
;
this
[
'boxFrame2'
].
visible
=
true
;
this
[
'boxFrame3'
].
visible
=
false
;
await
wait
(
1000
/
10
);
this
[
'boxFrame1'
].
visible
=
false
;
this
[
'boxFrame2'
].
visible
=
false
;
this
[
'boxFrame3'
].
visible
=
true
;
await
wait
(
300
);
this
[
'boxLayer'
].
visible
=
false
;
}
onTap_box
()
{
async
onTap_box
()
{
const
data
=
getHomeData
();
if
(
data
.
canReceiveTreasureBoxNum
>
0
)
{
await
this
.
playAni
();
this
[
'box'
].
touchEnabled
=
false
;
NetManager
.
ins
.
hc_openTreasureBox
((
success
)
=>
{
this
[
'box'
].
touchEnabled
=
true
;
if
(
success
)
{
const
boxdata
=
DataManager
.
ins
.
getData
(
'hc_openTreasureBox'
).
data
;
if
(
success
)
{
const
boxdata
=
DataManager
.
ins
.
getData
(
'hc_openTreasureBox'
).
data
;
const
homeData
=
DataManager
.
ins
.
getData
(
'hc_home'
).
data
;
homeData
.
canReceiveTreasureBoxNum
=
boxdata
.
canReceiveTreasureBoxNum
;
homeData
.
nextRangeStarsNum
=
boxdata
.
nextRangeStarsNum
;
homeData
.
totalStarts
=
boxdata
.
totalStarts
;
homeData
.
canReceiveTreasureBoxNum
=
boxdata
.
canReceiveTreasureBoxNum
;
homeData
.
nextRangeStarsNum
=
boxdata
.
nextRangeStarsNum
;
homeData
.
totalStarts
=
boxdata
.
totalStarts
;
this
.
updateBox
();
}
})
...
...
mock/happyclear/home.json
View file @
27e7d2fc
{
"code"
:
"0000000000"
,
"data"
:{
"askForEnergy"
:
true
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
10
,
"remainEnargy"
:
11
,
"remainProp"
:[
{
"type"
:
1
,
"num"
:
1
},
{
"type"
:
2
,
"num"
:
2
}
],
"levels"
:[
{
"levelNum"
:
1
,
"maxScore"
:
23
,
"stars"
:
3
},
{
"levelNum"
:
3
,
"maxScore"
:
23
,
"stars"
:
1
},
{
"levelNum"
:
2
,
"maxScore"
:
45
,
"stars"
:
2
}
],
"switchConf"
:[
{
"status"
:
1
,
"type"
:
1
},
{
"status"
:
1
,
"type"
:
2
}
],
"totalStarts"
:
15
,
"wealth"
:
5
},
"desc"
:
"OK"
,
"success"
:
true
,
"timestamp"
:
1565752605970
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1566457832261
,
"data"
:
{
"wealth"
:
0
,
"totalStars"
:
0
,
"levels"
:
[],
"remainProp"
:
[],
"remainEnargy"
:
5
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"nextRangeStarsNum"
:
10
}
}
\ No newline at end of file
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