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
ecd4fc12
Commit
ecd4fc12
authored
Oct 10, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a5fbe958
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
16 deletions
+17
-16
mine.getAppData.json
mock/miniTb/mine.getAppData.json
+3
-1
popmartXXL2c.getActivityBaseInfoById.json
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
+1
-1
Tools.ts
src/Tools.ts
+2
-2
PlayScene.ts
src/scene/PlayScene.ts
+2
-2
MapScene.ts
src/scene/map/MapScene.ts
+9
-10
No files found.
mock/miniTb/mine.getAppData.json
View file @
ecd4fc12
...
...
@@ -6,6 +6,8 @@
"activityId"
:
"string"
,
"openId"
:
"string"
,
"inviteId"
:
"string"
,
"isFollow"
:
true
"isFollow"
:
true
,
"isFirstLogin"
:
true
,
"loginAddPower"
:
false
}
}
mock/miniTb/popmartXXL2c.getActivityBaseInfoById.json
View file @
ecd4fc12
{
"code"
:
"000000"
,
"data"
:
{
"currentLevel"
:
2
,
"currentLevel"
:
1
,
"isFirstLogin"
:
false
,
"records"
:
[{
"score"
:
0
,
...
...
src/Tools.ts
View file @
ecd4fc12
...
...
@@ -31,6 +31,8 @@ export class Tools {
"openId"
:
string
,
"inviteId"
:
string
,
"isFollow"
:
boolean
,
"isFirstLogin"
:
boolean
,
"loginAddPower"
:
boolean
,
}
public
static
async
getAppData
()
{
...
...
@@ -77,8 +79,6 @@ export class Tools {
level100
:
string
,
level120
:
string
},
loginAddPower
:
boolean
,
isFirstLogin
:
boolean
,
//是否是首次
};
// 活动基本信息
public
static
getBaseInfo
()
{
...
...
src/scene/PlayScene.ts
View file @
ecd4fc12
...
...
@@ -323,10 +323,10 @@ export class PlayScene extends Scene {
}
else
{
this
.
enableMouseEvt
(
true
);
//首次送道具,的动画先出,然后再出引导
if
(
this
.
chapter
==
1
&&
Tools
.
baseInfo
.
isFirstLogin
)
{
if
(
this
.
chapter
==
1
&&
Tools
.
globalData
.
isFirstLogin
)
{
this
.
addChild
(
new
FirstPropGift
())
.
once
(
FYGE
.
MouseEvent
.
CLICK
,
(
e
:
FYGE
.
MouseEvent
)
=>
{
Tools
.
baseInfo
.
isFirstLogin
=
false
;
Tools
.
globalData
.
isFirstLogin
=
false
;
//移除自己
this
.
removeChild
(
e
.
target
)
//游戏引导
...
...
src/scene/map/MapScene.ts
View file @
ecd4fc12
...
...
@@ -51,9 +51,9 @@ export class MapScene extends Scene {
this
.
initMap
();
this
.
updateMapCheck
();
if
(
Tools
.
baseInfo
.
loginAddPower
&&
!
Tools
.
baseInfo
.
isFirstLogin
)
{
if
(
Tools
.
globalData
.
loginAddPower
&&
!
Tools
.
globalData
.
isFirstLogin
)
{
showPanel
(
FreePowerPanel
);
Tools
.
baseInfo
.
loginAddPower
=
false
;
Tools
.
globalData
.
loginAddPower
=
false
;
}
}
...
...
@@ -62,7 +62,7 @@ export class MapScene extends Scene {
if
(
this
.
data
&&
this
.
data
.
from
==
'loading'
)
{
this
.
uiLayer
=
this
.
addChild
(
new
MapUI
());
this
.
initMapByData
();
if
(
Tools
.
baseInfo
.
isFirstLogin
)
{
if
(
Tools
.
globalData
.
isFirstLogin
)
{
this
.
initGuide
();
}
}
else
{
...
...
@@ -77,11 +77,10 @@ export class MapScene extends Scene {
private
initGuide
()
{
//有bug再说
// Tools.g
ame
Data.isFirstLogin = false;
// Tools.g
lobal
Data.isFirstLogin = false;
const
guide
=
this
.
addChild
(
new
Container
());
guide
.
y
=
-
layers
.
stageOffsetY
;
guide
.
y
=
-
layers
.
stageOffsetY
;
const
g
=
guide
.
addChild
(
new
Graphics
());
g
.
beginFill
(
0
,
0.6
);
g
.
drawRect
(
0
,
0
,
750
,
1624
);
...
...
@@ -94,10 +93,10 @@ export class MapScene extends Scene {
mapGuide
.
mouseEnable
=
false
;
const
guide_check
=
guide
.
addChild
(
new
CheckBtn
({
check
:
1
}));
const
guide_check
=
guide
.
addChild
(
new
CheckBtn
({
check
:
1
}));
guide_check
.
enabled
=
true
;
guide_check
.
type
=
CHECK_TYPE
.
CUR
;
guide_check
.
position
.
set
(
MapScene
.
checkArr
[
1
].
x
,
MapScene
.
checkArr
[
1
].
y
);
guide_check
.
position
.
set
(
MapScene
.
checkArr
[
1
].
x
,
MapScene
.
checkArr
[
1
].
y
+
140
*
layers
.
stageOffsetY
/
812
);
guide_check
.
addChild
(
new
MapAvatar
());
const
guide_hand
=
guide
.
addChild
(
Tools
.
getSprite
(
'guide_hand.png'
));
...
...
@@ -121,7 +120,7 @@ export class MapScene extends Scene {
guide
.
alpha
=
0
;
Tween
.
get
(
guide
)
.
to
({
alpha
:
1
},
600
,
Ease
.
quadInOut
);
.
to
({
alpha
:
1
},
600
,
Ease
.
quadInOut
);
// Tween.get(guide_fox)
// .wait(300)
...
...
@@ -179,7 +178,7 @@ export class MapScene extends Scene {
const
arr
=
new
Array
(
120
);
for
(
let
i
=
0
;
i
<
120
;
i
++
)
{
arr
[
i
]
=
{
check
:
i
+
1
};
arr
[
i
]
=
{
check
:
i
+
1
};
}
arr
.
reverse
();
...
...
@@ -246,7 +245,7 @@ export class MapScene extends Scene {
if
(
Tools
.
globalData
.
inviteId
)
{
sendTbNet
(
TbNetName
.
doHelp
,
{
inviteId
:
Tools
.
globalData
.
inviteId
},
(
success
,
res
)
=>
{
if
(
success
)
showToast
(
'助力成功'
);
if
(
success
)
showToast
(
'助力成功'
);
// if (success) Tools.globalData.inviteId = null;
}
);
...
...
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