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
572856cc
Commit
572856cc
authored
Aug 22, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
063c86e8
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
39 additions
and
21 deletions
+39
-21
index.html
egret/index.html
+4
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+3
-3
btn.png
egret/resource/assets/common/btn.png
+0
-0
道具商城.png
egret/resource/assets/shop/道具商城.png
+0
-0
BloodSkin.exml
egret/resource/skins/BloodSkin.exml
+1
-1
Buy1Skin.exml
egret/resource/skins/Buy1Skin.exml
+1
-0
Buy2Skin.exml
egret/resource/skins/Buy2Skin.exml
+1
-0
Buy3Skin.exml
egret/resource/skins/Buy3Skin.exml
+1
-0
ShopSkin.exml
egret/resource/skins/ShopSkin.exml
+3
-0
PropType.ts
egret/src/PropType.ts
+3
-3
getHomeData.ts
egret/src/getHomeData.ts
+1
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-2
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+1
-0
Buy1Panel.ts
egret/src/panels/Buy1Panel.ts
+2
-1
Buy2Panel.ts
egret/src/panels/Buy2Panel.ts
+2
-1
Buy3Panel.ts
egret/src/panels/Buy3Panel.ts
+2
-1
ShopPanel.ts
egret/src/panels/ShopPanel.ts
+5
-3
home.json
mock/happyclear/home.json
+6
-6
No files found.
egret/index.html
View file @
572856cc
...
...
@@ -45,6 +45,10 @@
<script
src=
"libs/downloadApp.js"
></script>
<script
src=
"libs/svga.egret.min.js"
></script>
<script>
window
[
'price1'
]
=
1
;
window
[
'price2'
]
=
2
;
window
[
'price3'
]
=
3
;
window
[
'price4'
]
=
4
;
window
[
'INIT_BALL_NUMS'
]
=
1
;
window
[
'numsP'
]
=
0.1
;
// window['debugPhysics']=true;
...
...
egret/libs/tw/manager/NetManager.ts
View file @
572856cc
...
...
@@ -831,10 +831,10 @@ export class NetManager extends ABNetManager {
};
this
.
send
(
net
);
}
public
hc_exchange
(
callback
:
Function
,
category
:
number
,
propType
?:
number
):
void
{
public
hc_exchange
(
callback
:
Function
,
propType
?:
number
):
void
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
category
:
category
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
};
if
(
propType
)
{
d
.
propType
=
propType
;
...
...
egret/resource/assets/common/btn.png
View replaced file @
063c86e8
View file @
572856cc
22.1 KB
|
W:
|
H:
16.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/shop/道具商城.png
View replaced file @
063c86e8
View file @
572856cc
163 KB
|
W:
|
H:
155 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/skins/BloodSkin.exml
View file @
572856cc
...
...
@@ -37,5 +37,5 @@
<e:Label
text=
"使用钻石购买"
y=
"524"
textColor=
"0x821818"
size=
"27"
x=
"228"
/>
<e:Label
text=
"向好友索要体力"
y=
"663"
textColor=
"0x821818"
size=
"27"
x=
"232"
/>
<e:Label
id=
"invitTxt"
text=
"(已领0/1)"
y=
"699"
textColor=
"0x821818"
size=
"27"
x=
"232"
/>
<e:Label
text=
"20"
y=
"565"
textColor=
"0x821818"
x=
"274"
size=
"27"
/>
<e:Label
id=
"price1Txt"
text=
"20"
y=
"565"
textColor=
"0x821818"
x=
"274"
size=
"27"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/Buy1Skin.exml
View file @
572856cc
...
...
@@ -18,4 +18,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"priceTxt"
text=
"X100"
x=
"344"
y=
"614.52"
bold=
"true"
size=
"44"
touchEnabled=
"false"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/Buy2Skin.exml
View file @
572856cc
...
...
@@ -17,4 +17,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"priceTxt"
text=
"X100"
x=
"344"
y=
"614.52"
bold=
"true"
size=
"44"
touchEnabled=
"false"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/Buy3Skin.exml
View file @
572856cc
...
...
@@ -18,4 +18,5 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"priceTxt"
text=
"X100"
x=
"344"
y=
"614.52"
bold=
"true"
size=
"44"
touchEnabled=
"false"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/ShopSkin.exml
View file @
572856cc
...
...
@@ -2,6 +2,9 @@
<e:Skin
class=
"ShopSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16c953f5068"
horizontalCenter=
"0"
/>
<e:Image
source=
"道具商城_png"
y=
"42"
horizontalCenter=
"0"
/>
<e:Label
id=
"price1Txt"
text=
"20"
y=
"398.52"
x=
"294.52"
size=
"27"
textColor=
"0xc33700"
/>
<e:Label
id=
"price2Txt"
text=
"20"
y=
"541.44"
textColor=
"0xC33700"
x=
"295.4"
size=
"27"
/>
<e:Label
id=
"price3Txt"
text=
"20"
y=
"680.64"
textColor=
"0xC33700"
x=
"294.76"
size=
"27"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"614"
y=
"230"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
egret/src/PropType.ts
View file @
572856cc
enum
PropType
{
BOOM
=
1
,
HAMMER
,
CHANCE_NUM
BOOM
=
2
,
HAMMER
=
3
,
CHANCE_NUM
=
4
}
export
default
PropType
\ No newline at end of file
egret/src/getHomeData.ts
View file @
572856cc
...
...
@@ -5,6 +5,7 @@ interface IHomeData {
canReceiveTreasureBoxNum
;
wealth
;
remainEnargy
;
nextRangeStarsNum
;
askForEnergy
:
boolean
;
remainProp
:{
type
,
num
}[]
}
...
...
egret/src/mapScene/MapScene.ts
View file @
572856cc
...
...
@@ -75,7 +75,7 @@ export default class MapScene extends Scene {
updateBox
()
{
const
homeData
=
getHomeData
();
this
[
'boxiconWrapper'
].
visible
=
homeData
.
canReceiveTreasureBoxNum
>
0
;
this
[
'totalStarTxt'
].
text
=
`
${
homeData
.
totalStars
}
/
${
homeData
.
canReceiveTreasureBox
Num
}
`
;
this
[
'totalStarTxt'
].
text
=
`
${
homeData
.
totalStars
}
/
${
homeData
.
nextRangeStars
Num
}
`
;
this
[
'boxNumsTxt'
].
text
=
`
${
homeData
.
canReceiveTreasureBoxNum
}
`
;
}
...
...
@@ -87,7 +87,7 @@ export default class MapScene extends Scene {
this
[
'bloodTxt'
].
text
=
`
${
homeData
.
remainEnargy
}
/5`
;
this
[
'goldTxt'
].
text
=
`
${
homeData
.
wealth
}
`
;
for
(
let
j
=
0
;
j
<
70
;
j
++
)
{
for
(
let
j
=
1
;
j
<
70
;
j
++
)
{
this
.
disableIcon
(
j
+
1
);
}
for
(
let
i
=
0
;
i
<
homeData
.
levels
.
length
;
i
++
)
{
...
...
@@ -152,6 +152,7 @@ export default class MapScene extends Scene {
homeData
.
nextRangeStarsNum
=
boxdata
.
nextRangeStarsNum
;
homeData
.
totalStarts
=
boxdata
.
totalStarts
;
this
.
updateBox
();
PanelCtrl
.
instance
.
show
(
'box'
);
}
})
// }
...
...
egret/src/panels/BloodPanel.ts
View file @
572856cc
...
...
@@ -10,6 +10,7 @@ export default class BloodPanel extends Panel {
super
.
start
();
this
.
updateData
();
this
.
showlog
();
this
[
'price1Txt'
].
text
=
window
[
'price1'
]
}
showlog
(){
...
...
egret/src/panels/Buy1Panel.ts
View file @
572856cc
...
...
@@ -12,6 +12,7 @@ export default class Buy1Panel extends Panel {
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
this
.
showlog
();
this
[
'priceTxt'
].
text
=
'X'
+
window
[
'price3'
];
}
showlog
()
{
...
...
@@ -30,7 +31,7 @@ export default class Buy1Panel extends Panel {
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
},
2
,
PropType
.
HAMMER
);
//兑换道具
},
PropType
.
HAMMER
);
//兑换道具
}
get
skinKey
()
{
return
'Buy1'
}
...
...
egret/src/panels/Buy2Panel.ts
View file @
572856cc
...
...
@@ -11,6 +11,7 @@ export default class Buy2Panel extends Panel {
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
this
.
showlog
();
this
[
'priceTxt'
].
text
=
'X'
+
window
[
'price2'
];
}
showlog
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
8
));
...
...
@@ -28,7 +29,7 @@ export default class Buy2Panel extends Panel {
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
},
2
,
PropType
.
BOOM
);
//兑换道具
},
PropType
.
BOOM
);
//兑换道具
}
get
skinKey
()
{
return
'Buy2'
}
}
\ No newline at end of file
egret/src/panels/Buy3Panel.ts
View file @
572856cc
...
...
@@ -11,6 +11,7 @@ export default class Buy3Panel extends Panel {
this
[
'buyBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap
,
this
);
this
.
showlog
();
this
[
'priceTxt'
].
text
=
'X'
+
window
[
'price4'
];
}
showlog
()
{
NetManager
.
ins
.
showLog
(
getlogItem
(
14
));
...
...
@@ -29,6 +30,6 @@ export default class Buy3Panel extends Panel {
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
},
2
,
PropType
.
CHANCE_NUM
);
//兑换道具
},
PropType
.
CHANCE_NUM
);
//兑换道具
}
}
\ No newline at end of file
egret/src/panels/ShopPanel.ts
View file @
572856cc
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
PropType
from
"../PropType"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
ShopPanel
extends
Panel
{
buyBtn1
:
eui
.
Button
;
...
...
@@ -15,6 +13,10 @@ export default class ShopPanel extends Panel {
this
[
'buyBtn2'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onBuy2
,
this
);
this
[
'buyBtn3'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onBuy3
,
this
);
this
.
showLog
();
this
[
'price1Txt'
].
text
=
window
[
'price2'
]
this
[
'price2Txt'
].
text
=
window
[
'price3'
]
this
[
'price3Txt'
].
text
=
window
[
'price4'
]
}
showLog
()
{
...
...
mock/happyclear/home.json
View file @
572856cc
...
...
@@ -2,15 +2,15 @@
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
15664
64290978
,
"timestamp"
:
15664
74890397
,
"data"
:
{
"wealth"
:
0
,
"totalStars"
:
0
,
"wealth"
:
13
,
"totalStars"
:
12
0
,
"levels"
:
[],
"remainProp"
:
[],
"remainEnargy"
:
5
,
"remainEnargy"
:
1
5
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"nextRangeStarsNum"
:
1
0
"canReceiveTreasureBoxNum"
:
1
0
,
"nextRangeStarsNum"
:
2
0
}
}
\ 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