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
02587b60
Commit
02587b60
authored
Apr 01, 2020
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
dcb761f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
29 deletions
+32
-29
PrizeSkin.exml
egret/resource/skins/PrizeSkin.exml
+11
-11
MainScene.ts
egret/src/mainScene/MainScene.ts
+11
-10
Tool.ts
egret/src/something/Tool.ts
+10
-8
No files found.
egret/resource/skins/PrizeSkin.exml
View file @
02587b60
...
...
@@ -3,21 +3,21 @@
<w:Config
id=
"169005181d0"
/>
<e:Component
y=
"929.78"
skinName=
"ADSmallSkin"
x=
"68"
visible=
"false"
/>
<e:Image
id=
"light"
source=
"common_prizelight_png"
x=
"374.19"
y=
"253.76"
anchorOffsetX=
"375.76"
anchorOffsetY=
"327.27"
visible=
"false"
/>
<e:Image
source=
"prizePanelbg_png"
y=
"-1
55.7
2"
scale9Grid=
"87,543,522,23"
x=
"0"
/>
<e:Label
id=
"lvTxt"
text=
"关卡1"
y=
"
296
"
fontFamily=
"FZY3JW"
size=
"42"
textColor=
"0xffffff"
strokeColor=
"0xff8339"
stroke=
"3"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"picb"
x=
"286"
y=
"
386.7
8"
source=
"点亮 副本 2gray_png"
scaleX=
"-1"
/>
<e:Image
id=
"pica"
x=
"465.48"
y=
"
392.7
8"
source=
"点亮 副本 2gray_png"
/>
<e:Image
id=
"picc"
y=
"3
68.7
8"
source=
"点亮gray_png"
x=
"293"
/>
<e:Image
id=
"pic1"
source=
"点亮 副本 2_png"
x=
"203.18"
y=
"4
52.7
8"
anchorOffsetX=
"81.82"
anchorOffsetY=
"60.61"
scaleX=
"-1"
/>
<e:Image
id=
"pic3"
source=
"点亮 副本 2_png"
x=
"536.24"
y=
"4
58.7
8"
scaleX=
"1"
anchorOffsetX=
"71.76"
anchorOffsetY=
"66.61"
/>
<e:Image
id=
"pic2"
source=
"点亮_png"
y=
"4
39.7
8"
anchorOffsetX=
"73.94"
anchorOffsetY=
"74.73"
x=
"366.94"
/>
<e:Group
id=
"propGroup"
y=
"5
51.2
6"
horizontalCenter=
"0"
>
<e:Image
source=
"prizePanelbg_png"
y=
"-1
38.0
2"
scale9Grid=
"87,543,522,23"
x=
"0"
/>
<e:Label
id=
"lvTxt"
text=
"关卡1"
y=
"
313.7
"
fontFamily=
"FZY3JW"
size=
"42"
textColor=
"0xffffff"
strokeColor=
"0xff8339"
stroke=
"3"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"picb"
x=
"286"
y=
"
404.4
8"
source=
"点亮 副本 2gray_png"
scaleX=
"-1"
/>
<e:Image
id=
"pica"
x=
"465.48"
y=
"
410.4
8"
source=
"点亮 副本 2gray_png"
/>
<e:Image
id=
"picc"
y=
"3
86.4
8"
source=
"点亮gray_png"
x=
"293"
/>
<e:Image
id=
"pic1"
source=
"点亮 副本 2_png"
x=
"203.18"
y=
"4
70.4
8"
anchorOffsetX=
"81.82"
anchorOffsetY=
"60.61"
scaleX=
"-1"
/>
<e:Image
id=
"pic3"
source=
"点亮 副本 2_png"
x=
"536.24"
y=
"4
76.4
8"
scaleX=
"1"
anchorOffsetX=
"71.76"
anchorOffsetY=
"66.61"
/>
<e:Image
id=
"pic2"
source=
"点亮_png"
y=
"4
57.4
8"
anchorOffsetX=
"73.94"
anchorOffsetY=
"74.73"
x=
"366.94"
/>
<e:Group
id=
"propGroup"
y=
"5
68.9
6"
horizontalCenter=
"0"
>
<e:Image
source=
"物品奖励_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"nums"
text=
"×8"
size=
"48"
verticalAlign=
"middle"
textAlign=
"left"
fontFamily=
"FZY3JW"
textColor=
"0xC17343"
bold=
"true"
anchorOffsetX=
"0"
width=
"205"
x=
"278"
y=
"102.24"
/>
<e:Image
id=
"prop"
scaleY=
"0.8"
scaleX=
"0.8"
x=
"173"
y=
"80.24"
source=
"prize_blood_png"
/>
</e:Group>
<e:Image
id=
"img"
width=
"480"
height=
"214"
source=
"{data.url}"
horizontalCenter=
"0"
y=
"575.76"
visible=
"false"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"594.5"
y=
"2
73.5
"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"594.5"
y=
"2
91.2
"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
...
@@ -33,7 +33,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"goBtn"
label=
""
y=
"
790.7
8"
horizontalCenter=
"0"
>
<e:Button
id=
"goBtn"
label=
""
y=
"
808.4
8"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"按钮 副本 4_png"
source.down=
"按钮 副本 4_png"
source.disabled=
"按钮 副本 4_png"
/>
...
...
egret/src/mainScene/MainScene.ts
View file @
02587b60
...
...
@@ -613,6 +613,17 @@ export default class MainScene extends Scene {
curScoreNum
.
y
=
217.5
;
this
.
addChild
(
curScoreNum
);
//初始换道具容器
this
.
propBtnCon
=
new
PropBtnCon
();
this
.
propBtnCon
.
y
=
269
+
Tool
.
gameAreaHeight
// + 55;
this
.
addChild
(
this
.
propBtnCon
);
//按钮的事件
this
.
propBtnCon
.
boomBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boomBtn
,
this
)
this
.
propBtnCon
.
hammerBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_hammerBtn
,
this
)
this
.
propBtnCon
.
stepBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_stepBtn
,
this
)
//初始化道具信息
this
.
updateScene
();
//分数进度条,托管
this
.
scoreProgress
=
new
ScoreProgress
(
this
.
starProgress
,
curScoreNum
,
this
.
chapterData
.
starScores
);
//分数置0
...
...
@@ -652,16 +663,6 @@ export default class MainScene extends Scene {
stopBg
();
// setGameBgStatus(false);
}
//初始换道具容器
this
.
propBtnCon
=
new
PropBtnCon
();
this
.
propBtnCon
.
y
=
230
+
Tool
.
gameAreaHeight
+
55
;
this
.
addChild
(
this
.
propBtnCon
);
//按钮的事件
this
.
propBtnCon
.
boomBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_boomBtn
,
this
)
this
.
propBtnCon
.
hammerBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_hammerBtn
,
this
)
this
.
propBtnCon
.
stepBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_stepBtn
,
this
)
//初始化道具信息
this
.
updateScene
();
//选择框 无需加入场景
var
textureChoosed
:
egret
.
Texture
=
RES
.
getRes
(
"chooseRect_png"
)
this
.
choosed
=
new
eui
.
Image
(
textureChoosed
);
...
...
egret/src/something/Tool.ts
View file @
02587b60
...
...
@@ -17,18 +17,20 @@ const gameAreaHeightTwo: number[] = [];
//初始化适配位置,就因为棒棒糖的45偏移
function
initClientScale
()
{
var
stageHeight
=
document
.
body
.
clientHeight
/
document
.
body
.
clientWidth
*
750
;
var
middleHeight
=
80
*
9
;
var
smallestHeight
=
230
+
middleHeight
+
180
;
var
middleHeight
=
80
*
9
;
// 中间的高度
var
h1
=
269
;
var
h2
=
125
;
var
smallestHeight
=
h1
+
middleHeight
+
h2
;
if
(
stageHeight
<
smallestHeight
)
{
offsetYTwo
[
0
]
=
230
;
offsetYTwo
[
1
]
=
230
;
offsetYTwo
[
0
]
=
h1
;
offsetYTwo
[
1
]
=
h1
;
gameAreaHeightTwo
[
0
]
=
middleHeight
;
gameAreaHeightTwo
[
1
]
=
middleHeight
+
45
;
}
else
{
offsetYTwo
[
0
]
=
230
+
(
stageHeight
-
smallestHeight
)
/
2
;
offsetYTwo
[
1
]
=
230
+
(
stageHeight
-
smallestHeight
-
45
)
/
2
;
gameAreaHeightTwo
[
0
]
=
stageHeight
-
230
-
180
;
;
gameAreaHeightTwo
[
1
]
=
stageHeight
-
230
-
180
;
offsetYTwo
[
0
]
=
h1
+
(
stageHeight
-
smallestHeight
)
/
2
;
offsetYTwo
[
1
]
=
h1
+
(
stageHeight
-
smallestHeight
-
45
)
/
2
;
gameAreaHeightTwo
[
0
]
=
stageHeight
-
h1
-
h2
;
gameAreaHeightTwo
[
1
]
=
stageHeight
-
h1
-
h2
;
}
}
...
...
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