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
38625b7b
Commit
38625b7b
authored
Mar 31, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
体力获取有无转盘奖励
parent
d0e648fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
43 deletions
+45
-43
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+45
-43
No files found.
egret/src/panels/BloodPanel.ts
View file @
38625b7b
...
@@ -41,54 +41,56 @@ export default class BloodPanel extends Panel {
...
@@ -41,54 +41,56 @@ export default class BloodPanel extends Panel {
}
}
//切换显示状态,todo
//切换显示状态,todo
NetManager
.
ins
.
getTestShowTurntable
((
s
,
res
)
=>
{
NetManager
.
ins
.
getConfigInfo
((
s
,
res
)
=>
{
// console.log("收到获取是否展示转盘",s,res);
console
.
log
(
"收到获取是否展示转盘"
,
s
,
res
);
if
(
res
&&
res
.
data
){
//是否显示抽奖得体力
//显示条数
var
showcj
:
boolean
=
false
;
var
tipnum
:
number
=
3
;
if
(
res
&&
res
.
data
&&
res
.
data
.
luckyDrawConf
&&
res
.
data
.
luckyDrawConf
.
enable
){
//有无按钮
showcj
=
true
;
var
havebtn
:
boolean
=
true
;
}
//是否显示抽奖得体力
//显示条数
var
showcj
:
boolean
=
res
.
data
.
showcj
;
var
tipnum
:
number
=
3
;
this
[
"zhuanpan"
].
visible
=
showcj
;
//有无按钮
if
(
showcj
){
var
havebtn
:
boolean
=
true
;
this
[
"zhuanpan"
].
y
=
0
;
this
[
"yuanbao"
].
y
=
(
121
+
20
)
*
1
;
this
[
"zhuanpan"
].
visible
=
showcj
;
this
[
"fenxiang"
].
y
=
(
121
+
20
)
*
2
;
if
(
showcj
){
tipnum
=
3
;
this
[
"zhuanpan"
].
y
=
0
;
}
else
{
this
[
"yuanbao"
].
y
=
(
121
+
20
)
*
1
;
this
[
"yuanbao"
].
y
=
0
;
this
[
"fenxiang"
].
y
=
(
121
+
20
)
*
2
;
this
[
"fenxiang"
].
y
=
121
+
20
;
tipnum
=
3
;
tipnum
=
2
;
}
else
{
}
this
[
"yuanbao"
].
y
=
0
;
this
[
"fenxiang"
].
y
=
121
+
20
;
tipnum
=
2
;
}
//界面根据体力数量显示长短两个
//界面根据体力数量显示长短两个
const
homeData
=
getHomeData
();
const
homeData
=
getHomeData
();
havebtn
=
this
[
"resumeBtn"
].
visible
=
homeData
.
remainEnargy
>
0
?
true
:
false
;
havebtn
=
this
[
"resumeBtn"
].
visible
=
homeData
.
remainEnargy
>
0
?
true
:
false
;
var
bgheight
:
number
;
var
bgheight
:
number
;
var
cutheight
:
number
;
var
cutheight
:
number
;
if
(
tipnum
==
3
){
if
(
tipnum
==
3
){
if
(
havebtn
){
if
(
havebtn
){
bgheight
=
1130
;
bgheight
=
1130
;
cutheight
=
170
;
cutheight
=
170
;
}
else
{
cutheight
=
50
;
bgheight
=
1010
;
}
}
else
{
}
else
{
if
(
havebtn
){
cutheight
=
50
;
bgheight
=
1010
;
bgheight
=
1010
;
cutheight
=
170
}
}
else
{
}
else
{
bgheight
=
891
;
if
(
havebtn
){
cutheight
=
50
;
bgheight
=
1010
;
}
cutheight
=
170
}
else
{
bgheight
=
891
;
cutheight
=
50
;
}
}
this
[
"bg2"
].
height
=
bgheight
;
this
[
"botinfo"
].
y
=
bgheight
-
cutheight
-
75
-
40
;
}
}
this
[
"bg2"
].
height
=
bgheight
;
this
[
"botinfo"
].
y
=
bgheight
-
cutheight
-
75
-
40
;
})
})
this
[
'price1Txt'
].
text
=
`
${
window
[
'price1'
]}
个元宝=1个体力值`
;
this
[
'price1Txt'
].
text
=
`
${
window
[
'price1'
]}
个元宝=1个体力值`
;
this
[
'resumeBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
[
'resumeBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
...
...
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