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
90d58a2c
Commit
90d58a2c
authored
Feb 20, 2021
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m
parent
ceab59e4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
11 deletions
+39
-11
workspace.xml
.idea/workspace.xml
+12
-3
TaoBaoNet.ts
src/TaoBaoNet.ts
+2
-0
Tools.ts
src/Tools.ts
+24
-8
MapScene.ts
src/scene/map/MapScene.ts
+1
-0
No files found.
.idea/workspace.xml
View file @
90d58a2c
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"0d3cb18d-e144-41a0-bc8b-4877c2e1fef1"
name=
"默认的"
comment=
""
>
<list
default=
"true"
id=
"0d3cb18d-e144-41a0-bc8b-4877c2e1fef1"
name=
"默认的"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/class/Element.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/class/Element.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Tools.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Tools.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -135,7 +137,7 @@
...
@@ -135,7 +137,7 @@
<workItem
from=
"1612577003915"
duration=
"21094000"
/>
<workItem
from=
"1612577003915"
duration=
"21094000"
/>
<workItem
from=
"1612662929222"
duration=
"40609000"
/>
<workItem
from=
"1612662929222"
duration=
"40609000"
/>
<workItem
from=
"1613698993022"
duration=
"22309000"
/>
<workItem
from=
"1613698993022"
duration=
"22309000"
/>
<workItem
from=
"1613785579125"
duration=
"
1777
000"
/>
<workItem
from=
"1613785579125"
duration=
"
2245
000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"斐乐消消乐"
>
<task
id=
"LOCAL-00001"
summary=
"斐乐消消乐"
>
<created>
1612581213298
</created>
<created>
1612581213298
</created>
...
@@ -312,7 +314,14 @@
...
@@ -312,7 +314,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1613730899385
</updated>
<updated>
1613730899385
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"26"
/>
<task
id=
"LOCAL-00026"
summary=
"m"
>
<created>
1613787371878
</created>
<option
name=
"number"
value=
"00026"
/>
<option
name=
"presentableId"
value=
"LOCAL-00026"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1613787371878
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"27"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
src/TaoBaoNet.ts
View file @
90d58a2c
...
@@ -14,6 +14,8 @@ export enum TbNetName {
...
@@ -14,6 +14,8 @@ export enum TbNetName {
// 领取权益奖励
// 领取权益奖励
receiveEnamePrize
=
"feile.receiveEnamePrize"
,
receiveEnamePrize
=
"feile.receiveEnamePrize"
,
getRemainTimes
=
"feile.getRemainTimes"
,
/**
/**
* 活动基本信息
* 活动基本信息
* @param activityId
* @param activityId
...
...
src/Tools.ts
View file @
90d58a2c
...
@@ -96,28 +96,44 @@ export class Tools {
...
@@ -96,28 +96,44 @@ export class Tools {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
async
(
s
,
res
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
async
(
s
,
res
)
=>
{
if
(
s
)
{
if
(
s
)
{
//修改道具数量
// this.gameData.tools = res.data.tools;
await
Tools
.
updateTools
();
await
Tools
.
updateTools
();
resolve
(
true
)
resolve
(
true
)
;
}
else
{
}
else
{
// reject()
resolve
(
false
);
resolve
(
false
)
}
}
})
})
})
})
}
}
/**
* 更新道具
*/
public
static
updateTools
()
{
public
static
updateTools
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
getToolsInfo
,
{},
(
s
,
res
)
=>
{
sendTbNet
(
TbNetName
.
getToolsInfo
,
{},
(
s
,
res
)
=>
{
if
(
s
)
{
if
(
s
)
{
//修改道具数量
//修改道具数量
this
.
gameData
.
tools
=
res
.
data
.
tools
;
this
.
gameData
.
tools
=
res
.
data
.
tools
;
resolve
(
true
)
resolve
(
true
);
}
else
{
resolve
(
false
);
}
});
});
}
/**
* 更新体力
*/
public
static
updatePower
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
getRemainTimes
,
{},
(
s
,
res
)
=>
{
if
(
s
)
{
//修改体力数量
this
.
gameData
.
power
=
res
.
data
.
reaminTimes
;
resolve
(
true
);
}
else
{
}
else
{
// reject()
resolve
(
false
);
resolve
(
false
)
}
}
});
});
});
});
...
...
src/scene/map/MapScene.ts
View file @
90d58a2c
...
@@ -201,6 +201,7 @@ export class MapScene extends Scene {
...
@@ -201,6 +201,7 @@ export class MapScene extends Scene {
public
async
updateScene
()
{
public
async
updateScene
()
{
super
.
updateScene
();
super
.
updateScene
();
await
Tools
.
updatePower
();
this
.
uiLayer
.
updateUI
();
this
.
uiLayer
.
updateUI
();
}
}
...
...
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