Commit 7882d1ae authored by 邱旭's avatar 邱旭

m

parent d4537668
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
<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/panels/SuccessNoPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/output.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/output.js.map" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/LoadingScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/LoadingScene.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/LotteryScene.ts" beforeDir="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/panels/NoEnergyPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/NoEnergyPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/PlayScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/PlayScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapUI.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapUI.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" />
...@@ -65,7 +69,7 @@ ...@@ -65,7 +69,7 @@
<recent name="$PROJECT_DIR$/lotties" /> <recent name="$PROJECT_DIR$/lotties" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.flushRes"> <component name="RunManager" selected="npm.buildTS">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
...@@ -76,41 +80,41 @@ ...@@ -76,41 +80,41 @@
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="copyJs" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="buildTS" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
<scripts> <scripts>
<script value="copyJs" /> <script value="buildTS" />
</scripts> </scripts>
<node-interpreter value="project" /> <node-interpreter value="project" />
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="copyJs" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
<scripts> <scripts>
<script value="dev" /> <script value="copyJs" />
</scripts> </scripts>
<node-interpreter value="project" /> <node-interpreter value="project" />
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
<scripts> <scripts>
<script value="flushRes" /> <script value="dev" />
</scripts> </scripts>
<node-interpreter value="project" /> <node-interpreter value="project" />
<envs /> <envs />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="handleLotS" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
<scripts> <scripts>
<script value="handleLotS" /> <script value="flushRes" />
</scripts> </scripts>
<node-interpreter value="project" /> <node-interpreter value="project" />
<envs /> <envs />
...@@ -118,11 +122,11 @@ ...@@ -118,11 +122,11 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" /> <item itemvalue="npm.build" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.copyJs" /> <item itemvalue="npm.copyJs" />
<item itemvalue="npm.handleLotS" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -137,7 +141,7 @@ ...@@ -137,7 +141,7 @@
<workItem from="1612576979459" duration="13000" /> <workItem from="1612576979459" duration="13000" />
<workItem from="1612577003915" duration="21094000" /> <workItem from="1612577003915" duration="21094000" />
<workItem from="1612662929222" duration="40609000" /> <workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="4067000" /> <workItem from="1613698993022" duration="6983000" />
</task> </task>
<task id="LOCAL-00001" summary="斐乐消消乐"> <task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created> <created>1612581213298</created>
...@@ -251,7 +255,14 @@ ...@@ -251,7 +255,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1613703361421</updated> <updated>1613703361421</updated>
</task> </task>
<option name="localTasksCounter" value="17" /> <task id="LOCAL-00017" summary="m">
<created>1613703466149</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1613703466149</updated>
</task>
<option name="localTasksCounter" value="18" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -147,6 +147,7 @@ export enum TbNetName { ...@@ -147,6 +147,7 @@ export enum TbNetName {
* itemId * itemId
*/ */
openDetail = "mine.openDetail", openDetail = "mine.openDetail",
openTask = "mine.openTask",
/** /**
* 自定义埋点 * 自定义埋点
* logkey * logkey
......
...@@ -15,8 +15,7 @@ import Ease = FYGE.Ease; ...@@ -15,8 +15,7 @@ import Ease = FYGE.Ease;
export class Tools { export class Tools {
public static openTask() { public static openTask() {
console.error('TODO 打开任务'); sendTbNet(TbNetName.openTask);
alert('TODO 打开任务');
} }
public static addSteps = 5; public static addSteps = 5;
...@@ -95,10 +94,11 @@ export class Tools { ...@@ -95,10 +94,11 @@ export class Tools {
*/ */
public static consumerTools(type: PropType): Promise<boolean> { public static consumerTools(type: PropType): Promise<boolean> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
sendTbNet(TbNetName.consumerTools, { type }, (s, res) => { sendTbNet(TbNetName.consumerTools, { type }, async (s, res) => {
if (s) { if (s) {
//修改道具数量 //修改道具数量
this.gameData.tools = res.data.tools; // this.gameData.tools = res.data.tools;
await Tools.updateTools();
resolve(true) resolve(true)
} else { } else {
// reject() // reject()
...@@ -108,6 +108,21 @@ export class Tools { ...@@ -108,6 +108,21 @@ export class Tools {
}) })
} }
public static updateTools() {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.getToolsInfo, {}, (s, res) => {
if (s) {
//修改道具数量
this.gameData.tools = res.data.tools;
resolve(true)
} else {
// reject()
resolve(false)
}
});
});
}
public static gameOver(data) { public static gameOver(data) {
if (data.level == Tools.maxLevel) { // 99肯定是抽奖机会 if (data.level == Tools.maxLevel) { // 99肯定是抽奖机会
showPanel(SuccessNoPrizePanel, data); showPanel(SuccessNoPrizePanel, data);
......
...@@ -17,6 +17,13 @@ export class NoEnergyPanel extends Panel { ...@@ -17,6 +17,13 @@ export class NoEnergyPanel extends Panel {
this.addChild(Tools.getSprite('体力不足.png')).position.set(171, 582); this.addChild(Tools.getSprite('体力不足.png')).position.set(171, 582);
this.okBtn = this.addChild(new Button(RES.getRes('体力不足按钮.png'))); this.okBtn = this.addChild(new Button(RES.getRes('体力不足按钮.png')));
this.okBtn.position.set(190, 830); this.okBtn.position.set(190, 830);
this.addChild(new Button(RES.getRes('关闭按钮.png')))
.addEventListener(MouseEvent.CLICK, () => {
this.hidePanel();
this.data.cancel();
}, this)
.position.set(640, 494);
} }
start(data) { start(data) {
......
...@@ -791,7 +791,7 @@ export class PlayScene extends Scene { ...@@ -791,7 +791,7 @@ export class PlayScene extends Scene {
* 更新三个道具 * 更新三个道具
* 绝对别修改,其他地方有调用的 * 绝对别修改,其他地方有调用的
*/ */
updateScene() { async updateScene() {
this.propBtnCon.boomCount = Tools.gameData.tools.booms; this.propBtnCon.boomCount = Tools.gameData.tools.booms;
this.propBtnCon.hammerCount = Tools.gameData.tools.hammers; this.propBtnCon.hammerCount = Tools.gameData.tools.hammers;
this.propBtnCon.stepCount = Tools.gameData.tools.steps; this.propBtnCon.stepCount = Tools.gameData.tools.steps;
......
...@@ -61,8 +61,6 @@ export default class MapUI extends Container { ...@@ -61,8 +61,6 @@ export default class MapUI extends Container {
break; break;
case this.clearanceBtn: case this.clearanceBtn:
/// TODO 打开通关抽奖
// console.error("TODO 打开通关抽奖");
showPanel(LotteryPanel) showPanel(LotteryPanel)
break; break;
} }
......
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