Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
王剑峰
babycare_xiaoxiao
Commits
dd9d6742
Commit
dd9d6742
authored
Jul 15, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Success Panel Effect!
parent
f2b1003a
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
164 additions
and
94 deletions
+164
-94
workspace.xml
.idea/workspace.xml
+33
-45
babycare.getIndex.json
mock/miniTb/babycare.getIndex.json
+1
-1
闯关成功.png
resource/SuccessPanel/闯关成功.png
+0
-0
闯关成功Bg.png
resource/SuccessPanel/闯关成功Bg.png
+0
-0
res.json
resource/res.json
+1
-1
ResJson.ts
src/ResJson.ts
+1
-1
SkinJson.ts
src/SkinJson.ts
+46
-2
SuccessNoPrizePanel.ts
src/panels/SuccessNoPrizePanel.ts
+14
-1
SuccessPrizePanel.ts
src/panels/SuccessPrizePanel.ts
+15
-1
CheckBtn.ts
src/scene/map/CheckBtn.ts
+1
-1
MapPart.ts
src/scene/map/MapPart.ts
+11
-3
MapScene.ts
src/scene/map/MapScene.ts
+41
-38
No files found.
.idea/workspace.xml
View file @
dd9d6742
This diff is collapsed.
Click to expand it.
mock/miniTb/babycare.getIndex.json
View file @
dd9d6742
...
...
@@ -4,7 +4,7 @@
"message"
:
"OK"
,
"data"
:
{
"power"
:
100
,
"currentLevel"
:
120
,
"currentLevel"
:
96
,
"tools"
:
{
"STEPS"
:
1
,
"BOOMS"
:
2
,
...
...
resource/SuccessPanel/闯关成功.png
View replaced file @
f2b1003a
View file @
dd9d6742
168 KB
|
W:
|
H:
136 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resource/SuccessPanel/闯关成功Bg.png
View replaced file @
f2b1003a
View file @
dd9d6742
166 KB
|
W:
|
H:
135 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resource/res.json
View file @
dd9d6742
...
...
@@ -73,7 +73,7 @@
"name"
:
"fiveVerHorDis"
},
{
"keys"
:
"
bg_loading_back.jp
g"
,
"keys"
:
"
img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,proDown.png,wheel.pn
g"
,
"name"
:
"loadingScene"
},
{
...
...
src/ResJson.ts
View file @
dd9d6742
...
...
@@ -73,7 +73,7 @@ export const ResJson = {
"name"
:
"fiveVerHorDis"
},
{
"keys"
:
"
bg_loading_back.jp
g"
,
"keys"
:
"
img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,proDown.png,wheel.pn
g"
,
"name"
:
"loadingScene"
},
{
...
...
src/SkinJson.ts
View file @
dd9d6742
...
...
@@ -9,6 +9,28 @@ export const SkinJson = {
"y"
:
0
,
"type"
:
"container"
,
"children"
:
[
{
"name"
:
"light1"
,
"x"
:
155
,
"y"
:
280
,
"alpha"
:
0.8
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"comm_light.png"
},
"id"
:
"light1"
},
{
"name"
:
"light2"
,
"x"
:
155
,
"y"
:
280
,
"alpha"
:
0.8
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"comm_light.png"
},
"id"
:
"light2"
},
{
"name"
:
"闯关成功Bg"
,
"x"
:
55
,
...
...
@@ -55,7 +77,7 @@ export const SkinJson = {
{
"name"
:
"关卡文字"
,
"x"
:
300
,
"y"
:
5
2
1
,
"y"
:
5
0
1
,
"alpha"
:
1
,
"type"
:
"text"
,
"props"
:
{
...
...
@@ -100,6 +122,28 @@ export const SkinJson = {
"y"
:
0
,
"type"
:
"container"
,
"children"
:
[
{
"name"
:
"light1"
,
"x"
:
155
,
"y"
:
280
,
"alpha"
:
0.8
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"comm_light.png"
},
"id"
:
"light1"
},
{
"name"
:
"light2"
,
"x"
:
155
,
"y"
:
280
,
"alpha"
:
0.8
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"comm_light.png"
},
"id"
:
"light2"
},
{
"name"
:
"闯关成功"
,
"x"
:
55
,
...
...
@@ -146,7 +190,7 @@ export const SkinJson = {
{
"name"
:
"关卡文字"
,
"x"
:
300
,
"y"
:
5
2
1
,
"y"
:
5
0
1
,
"alpha"
:
1
,
"type"
:
"text"
,
"props"
:
{
...
...
src/panels/SuccessNoPrizePanel.ts
View file @
dd9d6742
...
...
@@ -11,7 +11,7 @@ import { RES } from "../../module/RES";
export
class
SuccessNoPrizePanel
extends
Panel
{
get
groupNames
()
{
return
[
"SuccessPanel"
,
'starLight'
]
return
[
'SuccessPanel'
,
'starLight'
]
}
get
skinName
()
{
...
...
@@ -36,6 +36,8 @@ export class SuccessNoPrizePanel extends Panel {
againBtn
:
FYGE
.
Button
;
continueBtn
:
FYGE
.
Button
;
totalContinueBtn
:
FYGE
.
Button
;
light1
:
Sprite
;
light2
:
Sprite
;
private
starGroup
:
SuccessStarGroup
=
null
;
...
...
@@ -49,9 +51,20 @@ export class SuccessNoPrizePanel extends Panel {
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
.
position
.
set
(
373
,
680
);
this
.
lightEffect
();
this
.
starGroup
.
play
(
3
);
}
private
lightEffect
()
{
Tween
.
get
(
this
.
light1
,
{
loop
:
true
})
.
set
({
anchorX
:
219.5
,
anchorY
:
219.5
})
.
to
({
rotation
:
360
},
12000
);
Tween
.
get
(
this
.
light2
,
{
loop
:
true
})
.
set
({
anchorX
:
219.5
,
anchorY
:
219.5
})
.
to
({
rotation
:
-
360
},
12000
);
}
start
(
data
)
{
super
.
start
();
}
...
...
src/panels/SuccessPrizePanel.ts
View file @
dd9d6742
...
...
@@ -3,10 +3,11 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import
{
SuccessStarGroup
}
from
"./SuccessNoPrizePanel"
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
Sprite
=
FYGE
.
Sprite
;
export
class
SuccessPrizePanel
extends
Panel
{
get
groupNames
()
{
return
[
"SuccessPanel"
,
'starLight'
]
return
[
'SuccessPanel'
,
'starLight'
]
}
get
skinName
()
{
...
...
@@ -31,6 +32,8 @@ export class SuccessPrizePanel extends Panel {
againBtn
:
FYGE
.
Button
;
noPrizeAgainBtn
:
FYGE
.
Button
;
goPrizeBtn
:
FYGE
.
Button
;
light1
:
Sprite
;
light2
:
Sprite
;
private
starGroup
:
SuccessStarGroup
=
null
;
...
...
@@ -44,9 +47,20 @@ export class SuccessPrizePanel extends Panel {
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
.
position
.
set
(
373
,
678
);
this
.
lightEffect
();
this
.
starGroup
.
play
(
4
);
}
private
lightEffect
()
{
Tween
.
get
(
this
.
light1
,
{
loop
:
true
})
.
set
({
anchorX
:
219.5
,
anchorY
:
219.5
})
.
to
({
rotation
:
360
},
12000
);
Tween
.
get
(
this
.
light2
,
{
loop
:
true
})
.
set
({
anchorX
:
219.5
,
anchorY
:
219.5
})
.
to
({
rotation
:
-
360
},
12000
);
}
start
(
data
)
{
super
.
start
();
}
...
...
src/scene/map/CheckBtn.ts
View file @
dd9d6742
...
...
@@ -241,7 +241,7 @@ class CheckCurEffect extends Container {
this
.
light1
.
anchorTexture
.
set
(
0.5
,
0.5
);
this
.
light2
.
anchorTexture
.
set
(
0.5
,
0.5
);
this
.
position
.
set
(
5
3
,
50
);
this
.
position
.
set
(
5
5
,
50
);
this
.
mouseEnable
=
this
.
mouseChildren
=
false
;
}
...
...
src/scene/map/MapPart.ts
View file @
dd9d6742
...
...
@@ -20,11 +20,19 @@ export default class MapPart extends Container {
}
protected
initIcon
()
{
this
.
data
.
forEach
((
value
,
index
)
=>
{
// 坑爹的头像,所以倒着加,可以解决层级问题
for
(
let
i
=
this
.
data
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
value
=
this
.
data
[
i
];
const
nBtn
=
this
.
addChild
(
new
CheckBtn
(
value
));
nBtn
.
position
.
set
(
this
.
btnPos
[
i
ndex
][
0
],
this
.
btnPos
[
index
][
1
]);
nBtn
.
position
.
set
(
this
.
btnPos
[
i
][
0
],
this
.
btnPos
[
i
][
1
]);
MapScene
.
checkArr
[
value
.
check
]
=
nBtn
;
});
}
// this.data.forEach((value, index) => {
// const nBtn = this.addChild(new CheckBtn(value));
//
// nBtn.position.set(this.btnPos[index][0], this.btnPos[index][1]);
// MapScene.checkArr[value.check] = nBtn;
// });
}
}
src/scene/map/MapScene.ts
View file @
dd9d6742
...
...
@@ -5,7 +5,6 @@ import MapUI from "./MapUI";
import
MapMid
from
"./MapMid"
;
import
CheckBtn
,
{
CHECK_TYPE
}
from
"./CheckBtn"
;
import
{
layers
}
from
"../../../module/views/layers"
;
import
{
sendTbNet
,
TbNetName
}
from
"../../TaoBaoNet"
;
import
ScrollPage
=
FYGE
.
ScrollPage
;
import
Container
=
FYGE
.
Container
;
import
{
Tools
}
from
"../../Tools"
;
...
...
@@ -50,54 +49,58 @@ export class MapScene extends Scene {
this
.
initMap
();
this
.
updateMapCheck
();
showPanel
(
Success
PrizePanel
);
showPanel
(
Success
NoPrizePanel
)
}
private
updateMapCheck
()
{
sendTbNet
(
TbNetName
.
getIndex
,
{},
(
success
,
res
)
=>
{
if
(
!
success
)
return
;
this
.
uiLayer
.
energyBox
.
count
=
res
.
data
.
power
;
if
(
this
.
data
.
from
==
'loading'
)
{
this
.
initMapByData
(
Tools
.
gameData
);
}
else
{
Tools
.
getIndex
().
then
((
success
)
=>
{
if
(
success
)
{
this
.
initMapByData
(
Tools
.
gameData
);
}
});
}
}
const
currentLevel
=
res
.
data
.
currentLevel
;
private
initMapByData
(
data
)
{
this
.
uiLayer
.
energyBox
.
count
=
data
.
power
;
// 已经通关的
for
(
let
i
=
1
;
i
<
currentLevel
;
i
++
)
{
MapScene
.
checkArr
[
i
].
type
=
CHECK_TYPE
.
COM
;
MapScene
.
checkArr
[
i
].
enabled
=
true
;
}
const
currentLevel
=
data
.
currentLevel
;
// 当前关卡
if
(
currentLevel
<
121
&&
currentLevel
>
0
)
{
MapScene
.
checkArr
[
currentLevel
].
type
=
CHECK_TYPE
.
CUR
;
MapScene
.
checkArr
[
currentLevel
].
enabled
=
true
;
!
this
.
mapAvatar
&&
(
this
.
mapAvatar
=
this
.
addChild
(
new
MapAvatar
()));
this
.
mapAvatar
.
parent
&&
this
.
mapAvatar
.
parent
.
removeChild
(
this
.
mapAvatar
);
MapScene
.
checkArr
[
currentLevel
].
addChild
(
this
.
mapAvatar
);
}
// 已经通关的
for
(
let
i
=
1
;
i
<
currentLevel
;
i
++
)
{
MapScene
.
checkArr
[
i
].
type
=
CHECK_TYPE
.
COM
;
MapScene
.
checkArr
[
i
].
enabled
=
true
;
}
// 未通关的
for
(
let
i
=
currentLevel
+
1
;
i
<
121
;
i
++
)
{
MapScene
.
checkArr
[
i
].
type
=
CHECK_TYPE
.
COM
;
MapScene
.
checkArr
[
i
].
enabled
=
false
;
}
// 当前关卡
if
(
currentLevel
<
121
&&
currentLevel
>
0
)
{
MapScene
.
checkArr
[
currentLevel
].
type
=
CHECK_TYPE
.
CUR
;
MapScene
.
checkArr
[
currentLevel
].
enabled
=
true
;
!
this
.
mapAvatar
&&
(
this
.
mapAvatar
=
this
.
addChild
(
new
MapAvatar
()));
this
.
mapAvatar
.
parent
&&
this
.
mapAvatar
.
parent
.
removeChild
(
this
.
mapAvatar
);
MapScene
.
checkArr
[
currentLevel
].
addChild
(
this
.
mapAvatar
);
}
// 闯关记录里有的
res
.
data
.
visitors
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
data
=
v
;
});
// 未通关的
for
(
let
i
=
currentLevel
+
1
;
i
<
121
;
i
++
)
{
MapScene
.
checkArr
[
i
].
type
=
CHECK_TYPE
.
COM
;
MapScene
.
checkArr
[
i
].
enabled
=
false
;
}
// 奖励关卡
res
.
data
.
prize
s
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
isPrize
=
true
;
});
// 闯关记录里有的
data
.
visitor
s
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
data
=
v
;
});
this
.
scrollToCheck
(
currentLevel
);
// 奖励关卡
data
.
prizes
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
isPrize
=
true
;
});
}
);
this
.
scrollToCheck
(
currentLevel
);
}
public
initMap
()
{
...
...
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