Commit 90d58a2c authored by 邱旭's avatar 邱旭

m

parent ceab59e4
......@@ -3,7 +3,9 @@
<component name="ChangeListManager">
<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$/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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -135,7 +137,7 @@
<workItem from="1612577003915" duration="21094000" />
<workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="22309000" />
<workItem from="1613785579125" duration="1777000" />
<workItem from="1613785579125" duration="2245000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -312,7 +314,14 @@
<option name="project" value="LOCAL" />
<updated>1613730899385</updated>
</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 />
</component>
<component name="TypeScriptGeneratedFilesManager">
......
......@@ -14,6 +14,8 @@ export enum TbNetName {
// 领取权益奖励
receiveEnamePrize = "feile.receiveEnamePrize",
getRemainTimes = "feile.getRemainTimes",
/**
* 活动基本信息
* @param activityId
......
......@@ -96,28 +96,44 @@ export class Tools {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.consumerTools, { type }, async (s, res) => {
if (s) {
//修改道具数量
// this.gameData.tools = res.data.tools;
await Tools.updateTools();
resolve(true)
resolve(true);
} else {
// reject()
resolve(false)
resolve(false);
}
})
})
}
/**
* 更新道具
*/
public static updateTools() {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.getToolsInfo, {}, (s, res) => {
if (s) {
//修改道具数量
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 {
// reject()
resolve(false)
resolve(false);
}
});
});
......
......@@ -201,6 +201,7 @@ export class MapScene extends Scene {
public async updateScene() {
super.updateScene();
await Tools.updatePower();
this.uiLayer.updateUI();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment