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
47daebcf
Commit
47daebcf
authored
Oct 31, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2266a8f9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
18 deletions
+19
-18
Blood2Skin.exml
egret/resource/skins/Blood2Skin.exml
+1
-1
BloodSkin.exml
egret/resource/skins/BloodSkin.exml
+1
-1
getHomeData.ts
egret/src/getHomeData.ts
+1
-1
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+6
-6
BloodPanel2.ts
egret/src/panels/BloodPanel2.ts
+8
-7
config.js
mock/config.js
+1
-1
home.json
mock/happyclear/home.json
+1
-1
No files found.
egret/resource/skins/Blood2Skin.exml
View file @
47daebcf
...
...
@@ -25,7 +25,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"inviteBtn2"
label=
""
x=
"439.08"
y=
"621.6"
>
<e:Button
id=
"inviteBtn2"
label=
""
x=
"439.08"
y=
"621.6"
visible=
"false"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"blood2去分享按钮_png"
source.down=
"blood2去分享按钮_png"
source.disabled=
"blood2去分享按钮_png"
/>
...
...
egret/resource/skins/BloodSkin.exml
View file @
47daebcf
...
...
@@ -37,7 +37,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"inviteBtn2"
label=
""
x=
"433"
y=
"635"
>
<e:Button
id=
"inviteBtn2"
label=
""
x=
"433"
y=
"635"
visible=
"false"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"blood去分享_png"
source.down=
"blood去分享_png"
source.disabled=
"blood去分享_png"
/>
...
...
egret/src/getHomeData.ts
View file @
47daebcf
...
...
@@ -8,7 +8,7 @@ interface IHomeData {
wealth
;
remainEnargy
;
nextRangeStarsNum
;
askForEnergy
:
boolean
;
askForEnergy
:
number
;
remainProp
:{
type
,
num
}[]
}
export
default
():
IHomeData
=>
{
...
...
egret/src/panels/BloodPanel.ts
View file @
47daebcf
...
...
@@ -11,6 +11,7 @@ import { getlogItem } from "../Main";
import
CountDown
from
"../mapScene/CountDown"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
gotoNextLevel
}
from
"./gotoNextLevel"
;
import
BloodPanel2
from
"./BloodPanel2"
;
export
default
class
BloodPanel
extends
Panel
{
start
(
data
)
{
...
...
@@ -30,6 +31,7 @@ export default class BloodPanel extends Panel {
NetManager
.
ins
.
showLog
(
getlogItem
(
30
));
}
static
MAX
=
3
;
private
_countDown
:
CountDown
;
private
updateData
()
{
if
(
this
.
_countDown
==
null
)
{
...
...
@@ -38,9 +40,8 @@ export default class BloodPanel extends Panel {
const
homeData
=
getHomeData
();
this
[
'bloodTxt'
].
text
=
`你的可用体力值为:
${
homeData
.
remainEnargy
}
`
;
const
data
=
getHomeData
();
this
[
'invitTxt'
].
text
=
`(已领0/1)`
;
if
(
data
.
askForEnergy
){
this
[
'invitTxt'
].
text
=
`(已领1/1)`
;
this
[
'invitTxt'
].
text
=
`(已领
${
data
.
askForEnergy
}
/
${
BloodPanel
.
MAX
}
)`
;
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
){
this
[
'inviteBtn2'
].
visible
=
true
;
}
if
(
data
.
remainEnargy
>=
BLOOD_NUMS_MAX
)
{
//满了
...
...
@@ -90,15 +91,14 @@ export default class BloodPanel extends Panel {
showShare
(
1
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
if
(
data
.
askForEnergy
)
{
showToast
(
'对不起,
已经索要过体力
了~'
);
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
showToast
(
'对不起,
索要体力的机会已经用完
了~'
);
return
;
}
this
[
'inviteBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
this
[
'inviteBtn'
].
enabled
=
true
;
if
(
success
)
{
this
[
'invitTxt'
].
text
=
`(已领1/1)`
;
}
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
...
...
egret/src/panels/BloodPanel2.ts
View file @
47daebcf
...
...
@@ -10,6 +10,7 @@ import { iswx } from "../iswx";
import
{
getlogItem
}
from
"../Main"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
BloodPanel
from
"./BloodPanel"
;
export
default
class
BloodPanel2
extends
Panel
{
start
(
data
)
{
...
...
@@ -34,10 +35,10 @@ this['price1Txt'].text =`${ window['price1']}个元宝=1个体力值`;
const
homeData
=
getHomeData
();
this
[
'bloodTxt'
].
text
=
`你的可用体力值为:
${
homeData
.
remainEnargy
}
`
;
const
data
=
getHomeData
();
this
[
'invitTxt'
].
text
=
`(已领
0/1
)`
;
if
(
data
.
askForEnergy
)
this
[
'invit
Txt'
].
text
=
`(已领1/1)`
;
this
[
'invitTxt'
].
text
=
`(已领
${
data
.
askForEnergy
}
/
${
BloodPanel
.
MAX
}
)`
;
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
){
this
[
'invit
eBtn2'
].
visible
=
true
;
}
if
(
data
.
remainEnargy
>=
BLOOD_NUMS_MAX
)
{
//满了
this
[
'bloodTxt'
].
text
=
`你的可用体力值为:
${
homeData
.
remainEnargy
}
`
;
this
.
_countDown
.
stop
();
...
...
@@ -85,15 +86,15 @@ this['price1Txt'].text =`${ window['price1']}个元宝=1个体力值`;
showShare
(
1
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
if
(
data
.
askForEnergy
)
{
showToast
(
'对不起,
已经索要过体力
了~'
);
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
showToast
(
'对不起,
索要体力的机会已经用完
了~'
);
return
;
}
this
[
'inviteBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
this
[
'inviteBtn'
].
enabled
=
true
;
if
(
success
)
{
this
[
'invitTxt'
].
text
=
`(已领1/1)`
;
}
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
...
...
mock/config.js
View file @
47daebcf
...
...
@@ -46,7 +46,7 @@ const config = {
data
:
'./happyclear/openTreasureBox.json'
},
'/customActivity/happyclear/home'
:
{
data
:
'./happyclear/home
max
.json'
data
:
'./happyclear/home.json'
},
'/customActivity/happyclear/getLevelInfo'
:
{
data
:
'./happyclear/getLevelInfo.json'
...
...
mock/happyclear/home.json
View file @
47daebcf
...
...
@@ -23,7 +23,7 @@
}
],
"remainEnargy"
:
5
,
"askForEnergy"
:
false
,
"askForEnergy"
:
0
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
100
,
"isGetAllTreasureBox"
:
false
,
...
...
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