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
Show 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 @@
...
@@ -4,7 +4,7 @@
"message"
:
"OK"
,
"message"
:
"OK"
,
"data"
:
{
"data"
:
{
"power"
:
100
,
"power"
:
100
,
"currentLevel"
:
120
,
"currentLevel"
:
96
,
"tools"
:
{
"tools"
:
{
"STEPS"
:
1
,
"STEPS"
:
1
,
"BOOMS"
:
2
,
"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 @@
...
@@ -73,7 +73,7 @@
"name"
:
"fiveVerHorDis"
"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"
"name"
:
"loadingScene"
},
},
{
{
...
...
src/ResJson.ts
View file @
dd9d6742
...
@@ -73,7 +73,7 @@ export const ResJson = {
...
@@ -73,7 +73,7 @@ export const ResJson = {
"name"
:
"fiveVerHorDis"
"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"
"name"
:
"loadingScene"
},
},
{
{
...
...
src/SkinJson.ts
View file @
dd9d6742
...
@@ -9,6 +9,28 @@ export const SkinJson = {
...
@@ -9,6 +9,28 @@ export const SkinJson = {
"y"
:
0
,
"y"
:
0
,
"type"
:
"container"
,
"type"
:
"container"
,
"children"
:
[
"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"
,
"name"
:
"闯关成功Bg"
,
"x"
:
55
,
"x"
:
55
,
...
@@ -55,7 +77,7 @@ export const SkinJson = {
...
@@ -55,7 +77,7 @@ export const SkinJson = {
{
{
"name"
:
"关卡文字"
,
"name"
:
"关卡文字"
,
"x"
:
300
,
"x"
:
300
,
"y"
:
5
2
1
,
"y"
:
5
0
1
,
"alpha"
:
1
,
"alpha"
:
1
,
"type"
:
"text"
,
"type"
:
"text"
,
"props"
:
{
"props"
:
{
...
@@ -100,6 +122,28 @@ export const SkinJson = {
...
@@ -100,6 +122,28 @@ export const SkinJson = {
"y"
:
0
,
"y"
:
0
,
"type"
:
"container"
,
"type"
:
"container"
,
"children"
:
[
"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"
:
"闯关成功"
,
"name"
:
"闯关成功"
,
"x"
:
55
,
"x"
:
55
,
...
@@ -146,7 +190,7 @@ export const SkinJson = {
...
@@ -146,7 +190,7 @@ export const SkinJson = {
{
{
"name"
:
"关卡文字"
,
"name"
:
"关卡文字"
,
"x"
:
300
,
"x"
:
300
,
"y"
:
5
2
1
,
"y"
:
5
0
1
,
"alpha"
:
1
,
"alpha"
:
1
,
"type"
:
"text"
,
"type"
:
"text"
,
"props"
:
{
"props"
:
{
...
...
src/panels/SuccessNoPrizePanel.ts
View file @
dd9d6742
...
@@ -11,7 +11,7 @@ import { RES } from "../../module/RES";
...
@@ -11,7 +11,7 @@ import { RES } from "../../module/RES";
export
class
SuccessNoPrizePanel
extends
Panel
{
export
class
SuccessNoPrizePanel
extends
Panel
{
get
groupNames
()
{
get
groupNames
()
{
return
[
"SuccessPanel"
,
'starLight'
]
return
[
'SuccessPanel'
,
'starLight'
]
}
}
get
skinName
()
{
get
skinName
()
{
...
@@ -36,6 +36,8 @@ export class SuccessNoPrizePanel extends Panel {
...
@@ -36,6 +36,8 @@ export class SuccessNoPrizePanel extends Panel {
againBtn
:
FYGE
.
Button
;
againBtn
:
FYGE
.
Button
;
continueBtn
:
FYGE
.
Button
;
continueBtn
:
FYGE
.
Button
;
totalContinueBtn
:
FYGE
.
Button
;
totalContinueBtn
:
FYGE
.
Button
;
light1
:
Sprite
;
light2
:
Sprite
;
private
starGroup
:
SuccessStarGroup
=
null
;
private
starGroup
:
SuccessStarGroup
=
null
;
...
@@ -49,9 +51,20 @@ export class SuccessNoPrizePanel extends Panel {
...
@@ -49,9 +51,20 @@ export class SuccessNoPrizePanel extends Panel {
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
.
position
.
set
(
373
,
680
);
this
.
starGroup
.
position
.
set
(
373
,
680
);
this
.
lightEffect
();
this
.
starGroup
.
play
(
3
);
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
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
}
}
...
...
src/panels/SuccessPrizePanel.ts
View file @
dd9d6742
...
@@ -3,10 +3,11 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
...
@@ -3,10 +3,11 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import
{
SuccessStarGroup
}
from
"./SuccessNoPrizePanel"
;
import
{
SuccessStarGroup
}
from
"./SuccessNoPrizePanel"
;
import
Tween
=
FYGE
.
Tween
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
Ease
=
FYGE
.
Ease
;
import
Sprite
=
FYGE
.
Sprite
;
export
class
SuccessPrizePanel
extends
Panel
{
export
class
SuccessPrizePanel
extends
Panel
{
get
groupNames
()
{
get
groupNames
()
{
return
[
"SuccessPanel"
,
'starLight'
]
return
[
'SuccessPanel'
,
'starLight'
]
}
}
get
skinName
()
{
get
skinName
()
{
...
@@ -31,6 +32,8 @@ export class SuccessPrizePanel extends Panel {
...
@@ -31,6 +32,8 @@ export class SuccessPrizePanel extends Panel {
againBtn
:
FYGE
.
Button
;
againBtn
:
FYGE
.
Button
;
noPrizeAgainBtn
:
FYGE
.
Button
;
noPrizeAgainBtn
:
FYGE
.
Button
;
goPrizeBtn
:
FYGE
.
Button
;
goPrizeBtn
:
FYGE
.
Button
;
light1
:
Sprite
;
light2
:
Sprite
;
private
starGroup
:
SuccessStarGroup
=
null
;
private
starGroup
:
SuccessStarGroup
=
null
;
...
@@ -44,9 +47,20 @@ export class SuccessPrizePanel extends Panel {
...
@@ -44,9 +47,20 @@ export class SuccessPrizePanel extends Panel {
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
=
this
.
addChild
(
new
SuccessStarGroup
());
this
.
starGroup
.
position
.
set
(
373
,
678
);
this
.
starGroup
.
position
.
set
(
373
,
678
);
this
.
lightEffect
();
this
.
starGroup
.
play
(
4
);
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
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
}
}
...
...
src/scene/map/CheckBtn.ts
View file @
dd9d6742
...
@@ -241,7 +241,7 @@ class CheckCurEffect extends Container {
...
@@ -241,7 +241,7 @@ class CheckCurEffect extends Container {
this
.
light1
.
anchorTexture
.
set
(
0.5
,
0.5
);
this
.
light1
.
anchorTexture
.
set
(
0.5
,
0.5
);
this
.
light2
.
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
;
this
.
mouseEnable
=
this
.
mouseChildren
=
false
;
}
}
...
...
src/scene/map/MapPart.ts
View file @
dd9d6742
...
@@ -20,11 +20,19 @@ export default class MapPart extends Container {
...
@@ -20,11 +20,19 @@ export default class MapPart extends Container {
}
}
protected
initIcon
()
{
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
));
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
;
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";
...
@@ -5,7 +5,6 @@ import MapUI from "./MapUI";
import
MapMid
from
"./MapMid"
;
import
MapMid
from
"./MapMid"
;
import
CheckBtn
,
{
CHECK_TYPE
}
from
"./CheckBtn"
;
import
CheckBtn
,
{
CHECK_TYPE
}
from
"./CheckBtn"
;
import
{
layers
}
from
"../../../module/views/layers"
;
import
{
layers
}
from
"../../../module/views/layers"
;
import
{
sendTbNet
,
TbNetName
}
from
"../../TaoBaoNet"
;
import
ScrollPage
=
FYGE
.
ScrollPage
;
import
ScrollPage
=
FYGE
.
ScrollPage
;
import
Container
=
FYGE
.
Container
;
import
Container
=
FYGE
.
Container
;
import
{
Tools
}
from
"../../Tools"
;
import
{
Tools
}
from
"../../Tools"
;
...
@@ -50,18 +49,25 @@ export class MapScene extends Scene {
...
@@ -50,18 +49,25 @@ export class MapScene extends Scene {
this
.
initMap
();
this
.
initMap
();
this
.
updateMapCheck
();
this
.
updateMapCheck
();
showPanel
(
Success
PrizePanel
);
showPanel
(
Success
NoPrizePanel
)
}
}
private
updateMapCheck
()
{
private
updateMapCheck
()
{
sendTbNet
(
TbNetName
.
getIndex
,
{},
if
(
this
.
data
.
from
==
'loading'
)
{
(
success
,
res
)
=>
{
this
.
initMapByData
(
Tools
.
gameData
);
}
else
{
if
(
!
success
)
return
;
Tools
.
getIndex
().
then
((
success
)
=>
{
if
(
success
)
{
this
.
initMapByData
(
Tools
.
gameData
);
}
});
}
}
this
.
uiLayer
.
energyBox
.
count
=
res
.
data
.
power
;
private
initMapByData
(
data
)
{
this
.
uiLayer
.
energyBox
.
count
=
data
.
power
;
const
currentLevel
=
res
.
data
.
currentLevel
;
const
currentLevel
=
data
.
currentLevel
;
// 已经通关的
// 已经通关的
for
(
let
i
=
1
;
i
<
currentLevel
;
i
++
)
{
for
(
let
i
=
1
;
i
<
currentLevel
;
i
++
)
{
...
@@ -85,19 +91,16 @@ export class MapScene extends Scene {
...
@@ -85,19 +91,16 @@ export class MapScene extends Scene {
}
}
// 闯关记录里有的
// 闯关记录里有的
res
.
data
.
visitors
.
forEach
((
v
)
=>
{
data
.
visitors
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
data
=
v
;
MapScene
.
checkArr
[
v
.
level
].
data
=
v
;
});
});
// 奖励关卡
// 奖励关卡
res
.
data
.
prizes
.
forEach
((
v
)
=>
{
data
.
prizes
.
forEach
((
v
)
=>
{
MapScene
.
checkArr
[
v
.
level
].
isPrize
=
true
;
MapScene
.
checkArr
[
v
.
level
].
isPrize
=
true
;
});
});
this
.
scrollToCheck
(
currentLevel
);
this
.
scrollToCheck
(
currentLevel
);
}
);
}
}
public
initMap
()
{
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